diff --git a/app/controllers/yiff_rest/api_v2/images_controller.rb b/app/controllers/yiff_rest/api_v2/images_controller.rb index 82eb9fb..b9d2b5e 100644 --- a/app/controllers/yiff_rest/api_v2/images_controller.rb +++ b/app/controllers/yiff_rest/api_v2/images_controller.rb @@ -108,6 +108,7 @@ module YiffRest end def leaderboard + @sp = {} @list = APIImage.all_seen.sort_by(&:second).reverse.to_h @keys = @list.map(&:first) @results = APIImage.where(id: @keys).sort_by { |img| @keys.index(img.md5) }