7 lines
292 B
TypeScript
7 lines
292 B
TypeScript
export function healthResponse(method: string | undefined, release = "development") {
|
|
if (method !== "GET" && method !== "HEAD") {
|
|
return { statusCode: 405, body: { error: "Method not allowed" } };
|
|
}
|
|
return { statusCode: 200, body: { status: "ok", service: "prompt", release } };
|
|
}
|