fix leaderboard
This commit is contained in:
parent
9b8139f5f4
commit
c2a315b945
@ -108,6 +108,7 @@ module YiffRest
|
|||||||
end
|
end
|
||||||
|
|
||||||
def leaderboard
|
def leaderboard
|
||||||
|
@sp = {}
|
||||||
@list = APIImage.all_seen.sort_by(&:second).reverse.to_h
|
@list = APIImage.all_seen.sort_by(&:second).reverse.to_h
|
||||||
@keys = @list.map(&:first)
|
@keys = @list.map(&:first)
|
||||||
@results = APIImage.where(id: @keys).sort_by { |img| @keys.index(img.md5) }
|
@results = APIImage.where(id: @keys).sort_by { |img| @keys.index(img.md5) }
|
||||||
|
Loading…
Reference in New Issue
Block a user