add health check

This commit is contained in:
smanylov
2026-02-18 14:21:57 +07:00
parent f4a13e2a8e
commit 906b3a554c
5 changed files with 80 additions and 47 deletions
+20
View File
@@ -158,4 +158,24 @@ export async function fetchINN(inn: string) {
} catch (error) {
return null
}
}
export async function getHealt() {
try {
const response = await fetch(`${API_BASE_URL}/check/api/healt`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
if (response.ok) {
return await response.json();
} else {
return null
}
} catch (error) {
return null
}
}