mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-07-14 18:15:56 -04:00
- Delete filterable-row, backup-schedule, integrations, and system-health atom files; replace with useState/useTransition + server action calls - Replace /api/explore/discover route with discoverByGenre server action; refactor FilterableTitleRow to call it directly via useTransition - Wrap PagesLayout and AuthLayout children in Suspense to fix dynamic rendering errors during PPR static generation; remove StoreProvider - Sequence ExplorePage session fetch before TMDB calls to prevent build-time requests during static generation - Drop unnecessary "use client" directives from dashboard and person components that have no client-side hooks or browser API usage - Improve Dockerfile: add bun install layer cache mount, copy .next/cache from builder, reorder ENV declarations
20 lines
511 B
TypeScript
20 lines
511 B
TypeScript
import { sql } from "drizzle-orm";
|
|
import { connection, NextResponse } from "next/server";
|
|
import { db } from "@/lib/db/client";
|
|
import { createLogger } from "@/lib/logger";
|
|
|
|
const log = createLogger("health");
|
|
|
|
export async function GET() {
|
|
await connection();
|
|
|
|
try {
|
|
db.run(sql`SELECT 1`);
|
|
|
|
return NextResponse.json({ status: "healthy" }, { status: 200 });
|
|
} catch (err) {
|
|
log.error("Health check failed:", err);
|
|
return NextResponse.json({ status: "unhealthy" }, { status: 503 });
|
|
}
|
|
}
|