mobile: set api URL and skip isOnline on browser
This commit is contained in:
@ -3,10 +3,13 @@ File name : database.js
|
||||
Description : Communicates with the server to ensure that the data is up to date.
|
||||
*/
|
||||
|
||||
const BASE_URL = "http://localhost/";
|
||||
const BASE_URL = "https://odari.ch/fecharts-api/";
|
||||
let feData = JSON.parse(localStorage.getItem("feData"));
|
||||
|
||||
function isOnline() {
|
||||
if (window.cordova.platformId == "browser")
|
||||
return true;
|
||||
|
||||
// Check that navigator.connection is not undefined to avoid error
|
||||
// Necessary when the app run on the browser
|
||||
const networkState = (navigator.connection) ? navigator.connection.type : null;
|
||||
|
Reference in New Issue
Block a user