Skip to content

Commit

Permalink
Update comments in 'blokus' and 'lobbys' files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashikkalis committed Dec 23, 2024
1 parent 4b22922 commit 3a2b604
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blokus.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ public function routeRequest($input) {
//lobby functions
$router->add('GET', 'lobbys', 'getLobbies');

//works
$router->add('POST', 'lobbys/create', function() {
createLobby(); // No parameters needed as the userId is hardcoded
});

//Issue with parameters
// $router->add('GET', 'lobbys/create', function($input) { //Figure out how we can test this one
// if (isset($input['player1_id']) && is_numeric($input['player1_id'])) {
// createLobby((int)$input['player1_id']);
Expand Down
2 changes: 2 additions & 0 deletions lib/lobbys.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function getLobbies() {
}
}

//works
function createLobby() {
$pdo = getDatabaseConnection();

Expand Down Expand Up @@ -48,6 +49,7 @@ function createLobby() {
}
}

//Issue with parameters
// function createLobby($userId) {
// $pdo = getDatabaseConnection();
// try {
Expand Down

0 comments on commit 3a2b604

Please sign in to comment.