fix null auth

jest ignore api path

ignore

test

test

test

test

test

test

test

revert back to localstorage for api auth
- errors during CI due to unavailable settings file
This commit is contained in:
jeffvli
2021-08-28 20:50:20 -07:00
parent f2e07a0460
commit d522cd85fe
3 changed files with 8 additions and 10 deletions

View File

@@ -1,17 +1,16 @@
import axios from 'axios';
import settings from 'electron-settings';
const getAuth = () => {
const serverConfig = {
username: settings.getSync('username') || '',
salt: settings.getSync('salt') || '',
hash: settings.getSync('hash') || '',
server: settings.getSync('server') || '',
username: localStorage.getItem('username') || '',
salt: localStorage.getItem('salt') || '',
hash: localStorage.getItem('hash') || '',
server: localStorage.getItem('server') || '',
};
return serverConfig;
};
const auth = getAuth();
const API_BASE_URL = `${auth.server}/rest`;