no need to return weight on suggestion apis

This commit is contained in:
Andrew Brown 2019-12-17 17:36:41 -06:00
parent d9050aa5f8
commit b7c0716e5c
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ module Api
entity_type: params.fetch(:entity_type, '').downcase
).order('weight desc').limit(
AttributeCategorySuggestion::SUGGESTIONS_RESULT_COUNT
).pluck(:suggestion, :weight)
).pluck(:suggestion)
if suggestions.empty?
CacheMostUsedAttributeCategoriesJob.perform_later(

View File

@ -7,7 +7,7 @@ module Api
category_label: params.fetch(:category, '').downcase
).order('weight desc').limit(
AttributeFieldSuggestion::SUGGESTIONS_RESULT_COUNT
).pluck(:suggestion, :weight)
).pluck(:suggestion)
if suggestions.empty?
CacheMostUsedAttributeFieldsJob.perform_later(