test production

This commit is contained in:
2025-05-08 20:32:32 +05:00
parent 21f3e98d69
commit 10d99bc585
2 changed files with 6 additions and 6 deletions

View File

@@ -3,6 +3,11 @@ function csrf_token()
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content');
}
function safeParse(data)
{
return (typeof data === 'string') ? JSON.parse(data) : data;
}
async function fetchLoanRemaining(containerID, passport_serie, passport_id, account_number) {
if (! passport_serie || ! passport_id || ! account_number) {
Nova.error('Maglumat ýetmezçiligi bar');
@@ -19,7 +24,7 @@ async function fetchLoanRemaining(containerID, passport_serie, passport_id, acco
Nova.$progress.start()
Nova.request().post('/api/fetch-loan-remaining', formData).then(response => {
let result = response.data;
let result = safeParse(result.data);
console.log(result)
if (result.errCode != 0) {