diff --git a/database/getChatroomMessages.php b/database/getChatroomMessages.php index c1ab513..7306a10 100644 --- a/database/getChatroomMessages.php +++ b/database/getChatroomMessages.php @@ -14,6 +14,6 @@ $stmt = $conn->prepare(" $stmt->execute(); $result = $stmt->get_result(); -echo encrypt(json_encode(array_map(fn($row) => ['username' => $row['username'], 'userid' => $row['user_id'], 'content' => $row['content'], 'id' => $row['chat_id'], 'icon' => $row['icon'], 'overlay' => $row['overlay'], 'birdColor' => json_decode($row['birdColor']), 'overlayColor' => json_decode($row['overlayColor'])], $result->fetch_all(MYSQLI_ASSOC)), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); +echo encrypt(json_encode(array_map(fn($row) => ['username' => $row['username'], 'userid' => $row['user_id'], 'content' => $row['content'], 'id' => $row['chat_id'], 'icon' => $row['icon'], 'overlay' => $row['overlay'], 'birdColor' => json_decode($row['birdColor']), 'overlayColor' => json_decode($row['overlayColor'])], $result->fetch_all(MYSQLI_ASSOC)))); $conn->close(); \ No newline at end of file diff --git a/database/getTopPlayers.php b/database/getTopPlayers.php index 593c253..9ca4c7c 100644 --- a/database/getTopPlayers.php +++ b/database/getTopPlayers.php @@ -27,6 +27,6 @@ $stmt->execute(); $result = $stmt->get_result(); -echo encrypt(json_encode(array_map(fn($row) => ['username' => $row['username'], 'userid' => $row['id'], 'value' => $row[$request_value], 'icon' => $row['icon'], 'overlay' => $row['overlay'], 'birdColor' => json_decode($row['birdColor']), 'overlayColor' => json_decode($row['overlayColor'])], $result->fetch_all(MYSQLI_ASSOC)), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); +echo encrypt(json_encode(array_map(fn($row) => ['username' => $row['username'], 'userid' => $row['id'], 'value' => $row[$request_value], 'icon' => $row['icon'], 'overlay' => $row['overlay'], 'birdColor' => json_decode($row['birdColor']), 'overlayColor' => json_decode($row['overlayColor'])], $result->fetch_all(MYSQLI_ASSOC)))); $conn->close(); \ No newline at end of file