fix(ui): health call after login/signup

This commit is contained in:
Shekar Siri 2024-11-06 15:10:08 +01:00
parent ce7dd32a41
commit d47491f989

View file

@ -1,9 +1,9 @@
import BaseService from './BaseService';
export default class HealthService extends BaseService {
fetchStatus(isPublic?: boolean): Promise<any> {
return this.client.get(isPublic ? '/health' : '/healthz')
.then(r => r.json())
.then(j => j.data || {})
async fetchStatus(isPublic?: boolean): Promise<any> {
const r = await this.client.get(isPublic ? '/healthz' : '/health');
const j = await r.json();
return j.data || {};
}
}
}