api+openapi: GET /api/ship + POST upgrade/expand/build with 400/404/409/422 mapping
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { getGameDb } from '@/lib/db/client'
|
||||
import { getShipState } from '@/lib/game/ship'
|
||||
|
||||
// The ship's systems + cargo hold + turn; auto-initializes on first hit.
|
||||
export async function GET() {
|
||||
const db = await getGameDb()
|
||||
return Response.json(await getShipState(db))
|
||||
}
|
||||
Reference in New Issue
Block a user