settings + reinvite players to lobby

This commit is contained in:
2026-02-28 05:49:56 +01:00
parent f4b94597c7
commit 90396b5338
32 changed files with 1000 additions and 268 deletions

View File

@@ -0,0 +1,27 @@
// src/routes/api/health/+server.ts
import { json } from '@sveltejs/kit';
import { db } from '$lib/server/db';
import { sql } from 'drizzle-orm';
import type { RequestHandler } from './$types';
export const GET: RequestHandler = async () => {
try {
// Check DB connectivity
await db.execute(sql`SELECT 1`);
return json({
status: 'ok',
timestamp: new Date().toISOString(),
uptime: process.uptime()
});
} catch (e: any) {
return json(
{
status: 'error',
error: 'Database connection failed',
timestamp: new Date().toISOString()
},
{ status: 503 }
);
}
};