fixed bug

This commit is contained in:
winter 2023-01-07 20:09:16 +09:00
parent f2ffd3ab90
commit 4b155d62a8
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ CrystalGauntlet.endpoints["/getGJScores20.php"] = ->(context : HTTP::Server::Con
sort = "stars desc"
stars = DATABASE.scalar("select stars from users where account_id = ?", account_id).as(Int64)
offset = DATABASE.scalar("select count(*) from users where stars > ?", stars).as(Int64)
offset = Math.max(offset - 10, 0)
when "friends"
# todo
user_id, account_id = Accounts.auth(params)