From 5c4c49d3c8243f90784efac0d07d6a52771fdeae Mon Sep 17 00:00:00 2001 From: Donovan Daniels Date: Thu, 24 Oct 2024 02:38:22 -0500 Subject: [PATCH] Properly fix the bulk route --- app/controllers/yiff_rest/api_v2_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/yiff_rest/api_v2_controller.rb b/app/controllers/yiff_rest/api_v2_controller.rb index ed4a72c..4f7211f 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.map(&:second).each do |img| + images.flat_map(&:second).each do |img| r.incr("yiffy2:stats:image:#{img.md5}") end req.each do |category, amount|