api: GET /api/system + POST /api/explore, OpenAPI spec updated in code
This commit is contained in:
@@ -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))
|
||||
}
|
||||
Reference in New Issue
Block a user