chore(api): add explicit type casting for request payloads

This commit is contained in:
jessy-david-dev
2026-04-11 15:20:29 +02:00
parent 7d1b236b46
commit d5a66c2dac
13 changed files with 204 additions and 96 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ export async function POST(req: NextRequest) {
}
const { mode, startArticle, targetArticle, path, clicks, timeSeconds, won } =
await req.json() as {
(await req.json()) as {
mode: string;
startArticle: string;
targetArticle: string;
@@ -53,6 +53,6 @@ export async function GET() {
games.map((g) => ({
...g,
path: JSON.parse(g.path) as string[],
}))
})),
);
}