0
0
Fork 0

Fix results/query in api/v1/featured_tags/suggestions (#29597)

This commit is contained in:
Matt Jankowski 2024-03-22 11:08:27 -04:00 committed by GitHub
parent 5db5fa879b
commit 34f293475e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 6 deletions

View file

@ -12,6 +12,10 @@ class Api::V1::FeaturedTags::SuggestionsController < Api::BaseController
private
def set_recently_used_tags
@recently_used_tags = Tag.recently_used(current_account).where.not(id: current_account.featured_tags).limit(10)
@recently_used_tags = Tag.recently_used(current_account).where.not(id: featured_tag_ids).limit(10)
end
def featured_tag_ids
current_account.featured_tags.pluck(:tag_id)
end
end