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

10 lines
414 B
TypeScript

import { getGameDb } from '@/lib/db/client'
import { getCrewState } from '@/lib/game/save'
// The ship's crew roster wrapped with the snapshot task queue: { crew, tasks } — the roster
// (starting crew plus members found while exploring) and the ACTIVE + PENDING queue. Auto-initializes on first hit.
export async function GET() {
const db = await getGameDb()
return Response.json(await getCrewState(db))
}