Send url to api and honour url on viewing published app
This commit is contained in:
parent
6e5957a01a
commit
58bcba71f7
|
@ -31,7 +31,13 @@
|
|||
async function updateApp() {
|
||||
try {
|
||||
// Update App
|
||||
await apps.update(app.instance._id, { name: $values.name.trim() })
|
||||
const body = {
|
||||
name: $values.name.trim(),
|
||||
}
|
||||
if ($values.url) {
|
||||
body.url = $values.url.trim()
|
||||
}
|
||||
await apps.update(app.instance._id, body)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
notifications.error(error)
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
}
|
||||
|
||||
const initiateAppCreation = () => {
|
||||
template = {}
|
||||
template = null
|
||||
creationModal.show()
|
||||
creatingApp = true
|
||||
}
|
||||
|
@ -164,7 +164,7 @@
|
|||
const viewApp = app => {
|
||||
if (!isCloud && app.deployed) {
|
||||
// special case to use the short form name if self hosted
|
||||
window.open(`/app/${encodeURIComponent(app.name)}`)
|
||||
window.open(`/app${app.url}`)
|
||||
} else {
|
||||
const id = app.deployed ? app.prodId : app.devId
|
||||
window.open(`/${id}`, "_blank")
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue