api: GET /api/system + POST /api/explore, OpenAPI spec updated in code

This commit is contained in:
2026-09-28 22:11:01 +00:00
parent 3aa27ffd89
commit 8153007668
4 changed files with 194 additions and 1 deletions
+8
View File
@@ -0,0 +1,8 @@
import { getGameDb } from '@/lib/db/client'
import { getSystemState } from '@/lib/game/save'
// The current system's bodies (planets + moons) and the save's inventory; auto-initializes on first hit.
export async function GET() {
const db = await getGameDb()
return Response.json(await getSystemState(db))
}