That can be minimized

This commit is contained in:
2025-07-12 20:25:33 -07:00
parent 62c299f5fd
commit 001df98458

View File

@@ -40,12 +40,10 @@ if ($currentHighScore > $user['highScore']) {
$user['highScore'] = $currentHighScore; $user['highScore'] = $currentHighScore;
} }
$data = ["session" => $token]; $data = ["session" => $tokenm, "username" => $user['username'], "userid" => $id];
if ($loginType === "0") { if ($loginType === "0") {
$data += [ $data += [
"username" => $user['username'],
"userid" => $id,
"highscore" => (string)$user['highScore'], "highscore" => (string)$user['highScore'],
"icon" => (int)$user['icon'], "icon" => (int)$user['icon'],
"overlay" => (int)$user['overlay'], "overlay" => (int)$user['overlay'],
@@ -58,11 +56,6 @@ if ($loginType === "0") {
"birdColor" => json_encode((string)$user['birdColor']), "birdColor" => json_encode((string)$user['birdColor']),
"overlayColor" => json_encode((string)$user['overlayColor']) "overlayColor" => json_encode((string)$user['overlayColor'])
]; ];
} elseif ($loginType === "1") {
$data += [
"username" => $user['username'],
"id" => $id
];
} }
echo encrypt(json_encode(["success" => true, "data" => $data])); echo encrypt(json_encode(["success" => true, "data" => $data]));