fix bulk route

This commit is contained in:
Donovan Daniels 2024-10-24 01:38:42 -05:00
parent e14419bc91
commit cce4fc996f
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ module YiffRest
url = params.dig(:api_image, :external_url) url = params.dig(:api_image, :external_url)
@image.convert_to_external(url) @image.convert_to_external(url)
redirect_to(yiff_rest_api_v2_manage_images_path(search: { id: @image.id }), notice: "Image concerted") redirect_to(yiff_rest_api_v2_manage_images_path(search: { id: @image.id }), notice: "Image converted")
end end
def update_cache def update_cache

View File

@ -126,7 +126,7 @@ module YiffRest
r.incr("yiffy2:stats:images:total:bulk") r.incr("yiffy2:stats:images:total:bulk")
r.incrby("yiffy2:stats:images:key:#{@apikey.id}", total) r.incrby("yiffy2:stats:images:key:#{@apikey.id}", total)
r.incr("yiffy2:stats:images:key:#{@apikey.id}:bulk") r.incr("yiffy2:stats:images:key:#{@apikey.id}:bulk")
images.each do |img| images.map(&:second).each do |img|
r.incr("yiffy2:stats:image:#{img.md5}") r.incr("yiffy2:stats:image:#{img.md5}")
end end
req.each do |category, amount| req.each do |category, amount|