Add ability to search artists in yiffy2 management
This commit is contained in:
parent
6d35687ea0
commit
8dbe779237
@ -69,7 +69,7 @@ module YiffRest
|
||||
end
|
||||
|
||||
def search_images_params
|
||||
permit_search_params(%i[category md5 original_url])
|
||||
permit_search_params(%i[category md5 original_url artists])
|
||||
end
|
||||
|
||||
def create_params
|
||||
|
@ -79,6 +79,7 @@ class APIImage < ApplicationRecord
|
||||
q = super
|
||||
q = q.attribute_matches(:category, params[:category])
|
||||
q = q.attribute_matches(:original_url, params[:original_url])
|
||||
q = q.attribute_matches(:artists, params[:artists])
|
||||
q.order(created_at: :desc)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user