pis #2

Merged
fred.boniface merged 76 commits from pis into main 2023-05-06 21:53:45 +01:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit 1d365ea374 - Show all commits

View File

@ -151,17 +151,17 @@ async function getApi(path,auth = false) {
log(`resp.status: ${resp.status}`)
log(`resp.json: ${json}`)
if (resp.status != 200) {
log(`lib.main: getApi: Response status: ${resp.status}`)
return resp.status
}
if (!resp.ok) {
log(`lib.main: getApi: Fetch error`)
return false
}
if (json === "[]") {
return 'empty'
}
return json;
} catch(err) {
return false
log(`lib.main: getApi: Caught fetch error. Status: ${resp.status}`)
return resp.status
}
}