mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
updated health check db (#195)
Some checks are pending
Runs E2E API Tests / build (20.x) (push) Waiting to run
Runs E2E API Tests / build (22.x) (push) Waiting to run
Lint & build / lint_and_build (20.x) (push) Waiting to run
Lint & build / lint_and_build (22.x) (push) Waiting to run
TOC Generator / TOC Generator (push) Waiting to run
Some checks are pending
Runs E2E API Tests / build (20.x) (push) Waiting to run
Runs E2E API Tests / build (22.x) (push) Waiting to run
Lint & build / lint_and_build (20.x) (push) Waiting to run
Lint & build / lint_and_build (22.x) (push) Waiting to run
TOC Generator / TOC Generator (push) Waiting to run
* updated health check db * improved code style
This commit is contained in:
parent
32d352b32b
commit
b2f92625da
@ -1,6 +1,16 @@
|
||||
import { prismaClient } from "@/prisma-client";
|
||||
import { StackAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
import { NextRequest } from "next/server";
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
if (req.nextUrl.searchParams.get("db")) {
|
||||
const project = await prismaClient.project.findFirst({});
|
||||
|
||||
if (!project) {
|
||||
throw new StackAssertionError("No project found");
|
||||
}
|
||||
}
|
||||
|
||||
return Response.json({
|
||||
status: "ok",
|
||||
}, {
|
||||
@ -9,6 +19,6 @@ export async function GET(req: NextRequest) {
|
||||
"Access-Control-Allow-Methods": "*",
|
||||
"Access-Control-Allow-Headers": "*",
|
||||
"Access-Control-Expose-Headers": "*",
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user