don't require login to see scores

This commit is contained in:
Jill 2023-01-05 09:46:59 +03:00
parent 215d435a3e
commit 581a9cb6cc

View file

@ -7,9 +7,6 @@ CrystalGauntlet.endpoints["/getGJLevelScores211.php"] = ->(context : HTTP::Serve
LOG.debug { params.inspect }
user_id, account_id = Accounts.auth(params)
if !(user_id && account_id)
return "-1"
end
level_id = params["levelID"].to_i32
daily_id = params["s10"].to_i32
@ -20,6 +17,10 @@ CrystalGauntlet.endpoints["/getGJLevelScores211.php"] = ->(context : HTTP::Serve
if params["percent"]? && params["percent"]? != "0"
# set score
if !(user_id && account_id)
return "-1"
end
attempts = params["s1"].to_i - 8354
clicks = params["s2"].to_i - 3991
time = params["s3"].to_i - 4085