O módulo usa a identidade Supabase, isola cada workspace e registra storage, TTL, runner e biblioteca XLSX como decisões ainda abertas. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
622 B
TypeScript
21 lines
622 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { getDb } from "@/infra/db/client";
|
|
|
|
export const runtime = "nodejs";
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function GET() {
|
|
try {
|
|
const db = await getDb();
|
|
await db.withService((query) => query.query("select 1 as ok"));
|
|
return NextResponse.json({
|
|
ok: true,
|
|
module: "spreadsheet-adapter",
|
|
redis: process.env.REDIS_URL ? "configured" : "not_configured",
|
|
storage: process.env.SUPABASE_STORAGE_BUCKET ? "supabase" : "unconfigured",
|
|
});
|
|
} catch {
|
|
return NextResponse.json({ ok: false }, { status: 503 });
|
|
}
|
|
}
|