diff --git a/src/routes/stats.tsx b/src/routes/stats.tsx index 3ce638a67..71cd12053 100644 --- a/src/routes/stats.tsx +++ b/src/routes/stats.tsx @@ -3,7 +3,7 @@ import resolvePlayerFromRequest from '../core/express/resolvePlayerFromRequest.j import stats, { StatType } from '../renderers/stats.js'; import { RouteRegistry } from '../server.js'; -export default { +export const statsRoute: RouteRegistry = { route: '/stats/:type/:period', inProduction: true, inDevelopment: false, @@ -21,4 +21,4 @@ export default { true, ); }, -} satisfies RouteRegistry; +}; diff --git a/src/server.ts b/src/server.ts index 660710863..c2ed63b6d 100644 --- a/src/server.ts +++ b/src/server.ts @@ -3,7 +3,7 @@ import normalizeRouteReturnable from './core/express/normalizeRouteReturnable.js import withAutoRefresh from './core/express/withAutoRefresh.js'; import isDev from './core/node/isDev.js'; import { Registry } from './events/interactionCreate/index.js'; -import stats from './routes/stats.js'; +import { statsRoute } from './routes/stats.js'; export type RouteReturnable = JSX.Element | Promise; @@ -20,7 +20,7 @@ export interface RouteRegistry const app = express(); -([stats] as RouteRegistry[]).forEach((registry) => { +([statsRoute] as RouteRegistry[]).forEach((registry) => { if (!(isDev() ? registry.inDevelopment : registry.inProduction)) return; app.get(registry.route, async (req, res) => {