diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-06-30 00:58:56 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-06-30 00:58:56 -0700 |
| commit | fae6914acace1a3b470f9d243fe8a2ba0f141388 (patch) | |
| tree | cc2ac24b97b464189c220d6c5abe7d48e92f28aa /backend/src/routes/game.ts | |
| parent | 722df5105c098f404e09e884a817acf92d939648 (diff) | |
add basic batch manual score upload route
Diffstat (limited to 'backend/src/routes/game.ts')
| -rw-r--r-- | backend/src/routes/game.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/backend/src/routes/game.ts b/backend/src/routes/game.ts new file mode 100644 index 0000000..26e7171 --- /dev/null +++ b/backend/src/routes/game.ts @@ -0,0 +1,19 @@ +import express from 'express'; +import { prisma } from '../config/db'; + +export const handleGetSupportedGames = async (req: express.Request, res: express.Response) => { + try { + const supportedGames = await prisma.game.findMany({ + select: { + internalName: true, + formattedName: true, + description: true + } + }); + res.status(200).json(supportedGames); + + } catch (error) { + console.error('Supported Games endpoint error:', error); + res.status(500).json({ error: 'Internal server error. Unable to fetch supported games' }); + } +} |
