ConusAI vendor 81941888f
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { sql } from 'drizzle-orm'
|
||||
import { db, serverErrors, withRequest } from '@/shared/api'
|
||||
|
||||
// 200 when Postgres answers; the platform probes this path (health_check_path).
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export async function GET(request: Request) {
|
||||
return withRequest(request, async () => {
|
||||
try {
|
||||
await db().execute(sql`select 1`)
|
||||
return Response.json({ status: 'ok' })
|
||||
} catch (error) {
|
||||
serverErrors().captureException(error)
|
||||
return Response.json({ status: 'unavailable' }, { status: 503 })
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user