Consolidate UI configuration in one place, allowing it to be overridden from the server

This commit is contained in:
Deluan
2020-04-07 16:58:02 -04:00
committed by Deluan Quintão
parent d0188db4f9
commit a0f389fc3e
4 changed files with 28 additions and 4 deletions
+2 -1
View File
@@ -1,11 +1,12 @@
import jwtDecode from 'jwt-decode'
import md5 from 'md5-hex'
import baseUrl from './utils/baseUrl'
import config from './config'
const authProvider = {
login: ({ username, password }) => {
let url = baseUrl('/app/login')
if (localStorage.getItem('initialAccountCreation')) {
if (config.firstTime) {
url = baseUrl('/app/createAdmin')
}
const request = new Request(url, {