mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-04-02 12:46:37 +00:00
refactor: run formatter
This commit is contained in:
@@ -2,17 +2,15 @@ import type { RequestHandler } from '@sveltejs/kit';
|
||||
import axios from 'axios';
|
||||
|
||||
export const GET: RequestHandler = async () => {
|
||||
const backendOK = await axios
|
||||
.get(process!.env!.INTERNAL_BACKEND_URL + '/healthz')
|
||||
.then(() => true, () => false);
|
||||
|
||||
return new Response(
|
||||
backendOK ? `{"status":"HEALTHY"}` : `{"status":"UNHEALTHY"}`,
|
||||
{
|
||||
status: backendOK ? 200 : 500,
|
||||
headers: {
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
}
|
||||
const backendOK = await axios.get(process!.env!.INTERNAL_BACKEND_URL + '/healthz').then(
|
||||
() => true,
|
||||
() => false
|
||||
);
|
||||
|
||||
return new Response(backendOK ? `{"status":"HEALTHY"}` : `{"status":"UNHEALTHY"}`, {
|
||||
status: backendOK ? 200 : 500,
|
||||
headers: {
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user