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 -1
View File
@@ -1,4 +1,5 @@
import { fetchUtils } from 'react-admin'
import baseUrl from "../utils/baseUrl"
const url = (command, id, options) => {
const params = new URLSearchParams()
@@ -18,7 +19,8 @@ const url = (command, id, options) => {
params.append(k, options[k])
})
}
return `rest/${command}?${params.toString()}`
const url = `/rest/${command}?${params.toString()}`
return baseUrl(url)
}
const scrobble = (id, submit) => {