fix(api): дублировать маршруты под /api и убрать Content-Type у GET
Some checks failed
CI / build-and-test (pull_request) Has been cancelled

This commit is contained in:
Anton
2026-04-08 10:20:17 +03:00
parent 7e9c20d4bf
commit 53b9561a54
5 changed files with 21 additions and 22 deletions

View File

@@ -12,6 +12,9 @@ export function createApp(): express.Express {
app.use(healthRouter);
app.use(racesRouter);
// Тот же API под /api/* — если прокси не снимает префикс или запрос идёт напрямую на порт бэкенда с /api.
app.use("/api", healthRouter);
app.use("/api", racesRouter);
app.use((err: unknown, _req: Request, res: Response, _next: NextFunction) => {
if (err instanceof SyntaxError && "body" in err) {