feat(server): implement ship REST endpoints with Zod validation

Adds GET/POST/PATCH/DELETE /api/ships with constraint validation (current <= max),
enum checks for maneuver_class, and cascade delete for weapons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bas van Rossem
2026-02-19 16:17:16 +01:00
parent 4b4d105009
commit 5f179229d6
5 changed files with 236 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
import type { FastifyInstance } from 'fastify';
export async function healthRoutes(app: FastifyInstance) {
app.get('/api/health', async () => {
return { status: 'ok', timestamp: Date.now() };
});
}