Fixing a minor issue with self hosting deployment/app creation.
This commit is contained in:
parent
1d48d4ec50
commit
182d720051
|
@ -94,17 +94,22 @@ exports.getDeployedApps = async () => {
|
||||||
}
|
}
|
||||||
const workerUrl = !env.CLOUD ? await exports.getWorkerUrl() : env.WORKER_URL
|
const workerUrl = !env.CLOUD ? await exports.getWorkerUrl() : env.WORKER_URL
|
||||||
const hostingKey = !env.CLOUD ? hostingInfo.selfHostKey : env.HOSTING_KEY
|
const hostingKey = !env.CLOUD ? hostingInfo.selfHostKey : env.HOSTING_KEY
|
||||||
const response = await fetch(`${workerUrl}/api/apps`, {
|
try {
|
||||||
method: "GET",
|
const response = await fetch(`${workerUrl}/api/apps`, {
|
||||||
headers: {
|
method: "GET",
|
||||||
"x-budibase-auth": hostingKey,
|
headers: {
|
||||||
},
|
"x-budibase-auth": hostingKey,
|
||||||
})
|
},
|
||||||
const json = await response.json()
|
})
|
||||||
for (let value of Object.values(json)) {
|
const json = await response.json()
|
||||||
if (value.url) {
|
for (let value of Object.values(json)) {
|
||||||
value.url = value.url.toLowerCase()
|
if (value.url) {
|
||||||
|
value.url = value.url.toLowerCase()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return json
|
||||||
|
} catch (err) {
|
||||||
|
// error, cannot determine deployed apps, don't stop app creation - sort this later
|
||||||
|
return {}
|
||||||
}
|
}
|
||||||
return json
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue