From 49d8c9d1a509dedf1de6fdf26d456d4811dff747 Mon Sep 17 00:00:00 2001 From: Jecket <35532868+Jecket22@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:07:55 +0100 Subject: [PATCH] fix* unregistered user -1 response --- src/endpoints/users/updateUser.cr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/endpoints/users/updateUser.cr b/src/endpoints/users/updateUser.cr index 53ba211..f177207 100644 --- a/src/endpoints/users/updateUser.cr +++ b/src/endpoints/users/updateUser.cr @@ -8,7 +8,9 @@ CrystalGauntlet.endpoints["/updateGJUserScore22.php"] = ->(context : HTTP::Serve user_id, account_id = Accounts.auth(params) if !(user_id && account_id) - return "-1" + # we assume this is an unregistered user + # since the client expects the returned value to be ...its own user id? we just return 0 + return "0" end # todo: keep track of stat changes to look out for leaderboard cheating & whatnot