api+openapi: GET /api/tech + POST /api/research with 400/404/409/422 mapping
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { getGameDb } from '@/lib/db/client'
|
||||
import { getTechState } from '@/lib/game/research'
|
||||
|
||||
// The full tech tree with per-save state (RESEARCHED / AVAILABLE / LOCKED + missing prereqs). Auto-initializes on first hit.
|
||||
export async function GET() {
|
||||
const db = await getGameDb()
|
||||
return Response.json(await getTechState(db))
|
||||
}
|
||||
Reference in New Issue
Block a user