Add BaseURL configuration (fixes #103)

This commit is contained in:
Deluan
2020-04-03 17:50:42 -04:00
parent b8eb22d162
commit 75cd21da1f
17 changed files with 61 additions and 25 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
import jwtDecode from 'jwt-decode'
import md5 from 'md5-hex'
import baseUrl from './utils/baseUrl'
const authProvider = {
login: ({ username, password }) => {
let url = '/app/login'
let url = baseUrl('/app/login')
if (localStorage.getItem('initialAccountCreation')) {
url = '/app/createAdmin'
url = baseUrl('/app/createAdmin')
}
const request = new Request(url, {
method: 'POST',