Files
SpaceWanderer/app/api/world/route.ts
T

9 lines
287 B
TypeScript

import { getGameDb } from '@/lib/db/client'
import { getWorldState } from '@/lib/game/save'
// The full world state for the single active save; auto-initializes on first hit.
export async function GET() {
const db = await getGameDb()
return Response.json(await getWorldState(db))
}