blob: 26e71717280d8b138468fd9d1b60d290d63ccddb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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' });
}
}
|