Add ability to search artists in yiffy2 management

This commit is contained in:
Donovan Daniels 2024-10-08 07:34:15 -05:00
parent 6d35687ea0
commit 8dbe779237
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
2 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@ module YiffRest
end end
def search_images_params def search_images_params
permit_search_params(%i[category md5 original_url]) permit_search_params(%i[category md5 original_url artists])
end end
def create_params def create_params

View File

@ -79,6 +79,7 @@ class APIImage < ApplicationRecord
q = super q = super
q = q.attribute_matches(:category, params[:category]) q = q.attribute_matches(:category, params[:category])
q = q.attribute_matches(:original_url, params[:original_url]) q = q.attribute_matches(:original_url, params[:original_url])
q = q.attribute_matches(:artists, params[:artists])
q.order(created_at: :desc) q.order(created_at: :desc)
end end
end end