diff --git a/app/controllers/yiff_rest/api_v2/images_controller.rb b/app/controllers/yiff_rest/api_v2/images_controller.rb index e20a7b2..82eb9fb 100644 --- a/app/controllers/yiff_rest/api_v2/images_controller.rb +++ b/app/controllers/yiff_rest/api_v2/images_controller.rb @@ -79,7 +79,7 @@ module YiffRest url = params.dig(:api_image, :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 def update_cache diff --git a/app/controllers/yiff_rest/api_v2_controller.rb b/app/controllers/yiff_rest/api_v2_controller.rb index 75a12f9..ed4a72c 100644 --- a/app/controllers/yiff_rest/api_v2_controller.rb +++ b/app/controllers/yiff_rest/api_v2_controller.rb @@ -126,7 +126,7 @@ module YiffRest r.incr("yiffy2:stats:images:total:bulk") r.incrby("yiffy2:stats:images:key:#{@apikey.id}", total) 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}") end req.each do |category, amount|