diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-08-29 23:15:02 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-08-29 23:15:02 -0700 |
| commit | d0d4f579f53e4a9e19b825dd5a1bf84c7d9f89e4 (patch) | |
| tree | 3491ba5565a3692aa9b90f2caf0661bf46f50656 /backend/src/index.ts | |
| parent | 2383a8ba0ad99937396230333f10c59050ddf5c5 (diff) | |
add backend admin api route to create new game
Diffstat (limited to 'backend/src/index.ts')
| -rw-r--r-- | backend/src/index.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/src/index.ts b/backend/src/index.ts index f51eaa2..01fc8d9 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -10,6 +10,7 @@ import * as authRoutes from './routes/auth'; import * as userRoutes from './routes/user'; import * as gameRoutes from './routes/game'; import * as scoreRoutes from './routes/score'; +import * as adminRoutes from './routes/admin'; const app = express(); const port = 5000; @@ -58,6 +59,8 @@ app.get('/api/scores', requireAuth, scoreRoutes.handleGetScores); app.delete('/api/scores', requireAuth, scoreRoutes.handleScoreDeletion); app.get('/api/scores/:chartId', requireAuth, scoreRoutes.handleGetScoresByChartId); +app.post('/api/admin/createGame', requireAuth, adminRoutes.handleCreateGame); + app.listen(port, () => { console.log(`Server listening on port ${port}`); }); |
