add health check
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ export async function yooKasaCreatePayment(amount: number, tariff: string) {
|
||||
return_url: 'test'
|
||||
},
|
||||
metadata: {
|
||||
userId: userEmail,
|
||||
userMail: userEmail,
|
||||
tariff: tariff
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user