From e6c3eae28bc7176d593ff77e21801f571cb3a080 Mon Sep 17 00:00:00 2001 From: tobybrave Date: Mon, 30 Aug 2021 17:23:48 +0100 Subject: [PATCH] static sidebar endpoints --- server/index.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index a211189c..6658e9d3 100644 --- a/server/index.js +++ b/server/index.js @@ -12,7 +12,23 @@ app.use(express.static(path.resolve(__dirname, '../client/build'))); app.get("/ping", (req, res) => { res.json({ message: "Hello from server!" }); }); -// Node API Endpoints + +// sidebars Endpoint +app.get("/sidebars", (req, res) => { + const sidebars = { + new: "/api/chess/game-type", + quickPlay: "/api/chess/game-type/quick-play", + multiplayer: "/api/chess/game-type/multiplayer", + singleplayer: "/api/chess/game-type/singleplayer", + tournament: "/api/chess/tournament", + createTournament: "/api/chess/tournament/create", + joinTournament: "/api/chess/tournament/join", + settings: "/api/chess/settings", + join: "/api/chess/join-live" +} + + res.status(200).json(sidebars) +})