bugfix: data components hitting correct url again
This commit is contained in:
parent
fae0b2d932
commit
32d1ca641b
|
@ -23,7 +23,7 @@ export const bbFactory = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiCall = method => (url, body) =>
|
const apiCall = method => (url, body) =>
|
||||||
fetch(relativeUrl(url), {
|
fetch(url, {
|
||||||
method: method,
|
method: method,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|
|
@ -45,7 +45,7 @@ const copyClientLib = async (appPath, pageName) => {
|
||||||
|
|
||||||
const buildIndexHtml = async (config, appId, pageName, appPath, pkg) => {
|
const buildIndexHtml = async (config, appId, pageName, appPath, pkg) => {
|
||||||
const appPublicPath = publicPath(appPath, pageName)
|
const appPublicPath = publicPath(appPath, pageName)
|
||||||
const appRootPath = appId
|
const appRootPath = rootPath(config, appId)
|
||||||
|
|
||||||
const stylesheetUrl = s =>
|
const stylesheetUrl = s =>
|
||||||
s.startsWith("http") ? s : `/${rootPath(config, appId)}/${s}`
|
s.startsWith("http") ? s : `/${rootPath(config, appId)}/${s}`
|
||||||
|
|
|
@ -25,9 +25,16 @@
|
||||||
|
|
||||||
const login = async () => {
|
const login = async () => {
|
||||||
loading = true
|
loading = true
|
||||||
const response = await _bb.api.post("/api/authenticate", {
|
const response = await fetch(_bb.relativeUrl("/api/authenticate"), {
|
||||||
username,
|
body: JSON.stringify({
|
||||||
password,
|
username,
|
||||||
|
password,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"x-user-agent": "Budibase Builder",
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
})
|
})
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
|
Loading…
Reference in New Issue