9 lines
312 B
TypeScript
9 lines
312 B
TypeScript
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))
|
|
}
|