Phase 0: fix typecheck, format, build; remove stray emit; pin port via env
CI / Lint, typecheck, test, build (push) Failing after 22s
CI / Lint, typecheck, test, build (push) Failing after 22s
This commit is contained in:
+2
-3
@@ -5,7 +5,7 @@
|
||||
import { Hono } from 'hono';
|
||||
import { cors } from 'hono/cors';
|
||||
import { logger } from 'hono/logger';
|
||||
import { UniverseSnapshotSchema, type AppType as _ } from '@kerbal-rt/shared-types';
|
||||
import { UniverseSnapshotSchema } from '@kerbal-rt/shared-types';
|
||||
import { z } from 'zod';
|
||||
import { state } from './state.js';
|
||||
|
||||
@@ -58,8 +58,7 @@ export function buildApp() {
|
||||
// ─── read-only endpoints ───────────────────────────────────────────────
|
||||
app.get('/api/v1/state', (c) => {
|
||||
const snap = state.latestSnapshot();
|
||||
if (!snap)
|
||||
return c.json({ error: true, code: 'NO_DATA', message: 'No snapshot yet' }, 503);
|
||||
if (!snap) return c.json({ error: true, code: 'NO_DATA', message: 'No snapshot yet' }, 503);
|
||||
return c.json({ error: false, data: snap });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user