From 8ac636186cf5f704264e7473864c54b3edaf4049 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 21 Nov 2022 21:39:17 +0100 Subject: Added basic games handling --- routes/games.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 routes/games.js (limited to 'routes/games.js') diff --git a/routes/games.js b/routes/games.js new file mode 100644 index 0000000..67d105d --- /dev/null +++ b/routes/games.js @@ -0,0 +1,15 @@ +import express from "express"; + +import { gameId_get } from "../controllers/games/gameId.js"; +import { root_get } from "../controllers/games/root.js"; +import requireAuth from "../middlewares/requireAuth.js"; +import session from "../middlewares/sessions.js"; + +const router = express.Router(); +router.use(session); +router.use(requireAuth); + +router.get("/", root_get); +router.get("/:gameId(\\d+)", gameId_get); + +export default router; -- cgit v1.2.3