update game endpoints

for getting all public games and finding specific games with code
This commit is contained in:
Nathaniel Tampus
2023-03-04 18:36:43 +08:00
parent 572eb22fc6
commit 6dc9f1a18a
2 changed files with 23 additions and 24 deletions

View File

@@ -3,9 +3,9 @@ import * as controller from "../controllers/games.controller.js";
const router = Router();
router.route("/").get(controller.getActiveGames).post(controller.createGame);
router.route("/").get(controller.getActivePublicGames).post(controller.createGame);
//router.route("/:id").put(controller.joinGame);
router.route("/:code").get(controller.getActiveGame);
// todo: api for updating games/moves requiring authentication