Files
AFFiNE-Mirror/packages/workspace/src/affine/api/status.ts
2023-03-29 15:46:10 -05:00

8 lines
206 B
TypeScript

export function createStatusApis(prefixUrl = '/') {
return {
healthz: async (): Promise<boolean> => {
return fetch(`${prefixUrl}api/healthz`).then(r => r.status === 204);
},
} as const;
}