Still working on network online offline detection...
This commit is contained in:
@@ -7,20 +7,13 @@ async function api_token_request_async(axios, secret_key) {
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (navigator.onLine) {
|
||||
} else {
|
||||
app_online = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
waiting_on_api_token = true;
|
||||
|
||||
const url = '/api_token_request';
|
||||
|
||||
let data = { secret_key: secret_key };
|
||||
|
||||
const response = await axios.post(url, data)
|
||||
const result = await axios.post(url, data)
|
||||
.then(function (response) {
|
||||
//console.log(response);
|
||||
const api_temporary_token = response.data.temporary_token;
|
||||
@@ -33,7 +26,7 @@ async function api_token_request_async(axios, secret_key) {
|
||||
});
|
||||
|
||||
waiting_on_api_token = false;
|
||||
return response;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user