mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
23 lines
440 B
TypeScript
23 lines
440 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export async function loader() {
|
|
try {
|
|
await prisma.$queryRaw`SELECT 1`;
|
|
|
|
return Response.json({
|
|
status: 'ok',
|
|
message: 'All systems operational',
|
|
});
|
|
} catch (err) {
|
|
console.error(err);
|
|
|
|
return Response.json(
|
|
{
|
|
status: 'error',
|
|
message: err instanceof Error ? err.message : 'Unknown error',
|
|
},
|
|
{ status: 500 },
|
|
);
|
|
}
|
|
}
|