Skip to content

Commit

Permalink
Test6 'leaveLobby' function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashikkalis committed Dec 23, 2024
1 parent 823698a commit 4c17132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blokus.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public function routeRequest($input) {


$router->add('POST', 'lobbys/leave', function($input) {
if (isset($input['lobbyId'])) {
leaveLobby((int)$input['lobbyId']);
if (isset($input['id'])) {
leaveLobby((int)$input['id']);
} else {
echo json_encode(['error' => 'Missing lobbyId parameter']);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/lobbys.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function joinLobby($userId, $lobbyId) {
// }
// }

function leaveLobby($lobby) {
function leaveLobby($lobbyId) {
$pdo = getDatabaseConnection();

try {
Expand Down

0 comments on commit 4c17132

Please sign in to comment.