Creator bug fix was not commited
This commit is contained in:
parent
c5753dab0a
commit
9f29a2c3d9
|
@ -16,6 +16,7 @@
|
||||||
import * as appValidation from "helpers/validation/yup/app"
|
import * as appValidation from "helpers/validation/yup/app"
|
||||||
import TemplateCard from "components/common/TemplateCard.svelte"
|
import TemplateCard from "components/common/TemplateCard.svelte"
|
||||||
import { lowercase } from "helpers"
|
import { lowercase } from "helpers"
|
||||||
|
import { sdk } from "@budibase/shared-core"
|
||||||
|
|
||||||
export let template
|
export let template
|
||||||
|
|
||||||
|
@ -141,6 +142,11 @@
|
||||||
// Create user
|
// Create user
|
||||||
await auth.setInitInfo({})
|
await auth.setInitInfo({})
|
||||||
|
|
||||||
|
if (sdk.users.isCreator($auth.user, app?.devId)) {
|
||||||
|
// Refresh for access to created applications
|
||||||
|
await auth.getSelf()
|
||||||
|
}
|
||||||
|
|
||||||
$goto(`/builder/app/${createdApp.instance._id}`)
|
$goto(`/builder/app/${createdApp.instance._id}`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
creating = false
|
creating = false
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
import { createValidationStore } from "helpers/validation/yup"
|
import { createValidationStore } from "helpers/validation/yup"
|
||||||
import { writable, get } from "svelte/store"
|
import { writable, get } from "svelte/store"
|
||||||
import * as appValidation from "helpers/validation/yup/app"
|
import * as appValidation from "helpers/validation/yup/app"
|
||||||
import { appsStore } from "stores/portal"
|
import { appsStore, auth } from "stores/portal"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
import { sdk } from "@budibase/shared-core"
|
||||||
|
|
||||||
export let appId
|
export let appId
|
||||||
export let appName
|
export let appName
|
||||||
|
@ -69,6 +70,10 @@
|
||||||
try {
|
try {
|
||||||
await API.duplicateApp(data, appId)
|
await API.duplicateApp(data, appId)
|
||||||
appsStore.load()
|
appsStore.load()
|
||||||
|
if (sdk.users.isCreator($auth.user, app?.devId)) {
|
||||||
|
// Refresh for access to created applications
|
||||||
|
await auth.getSelf()
|
||||||
|
}
|
||||||
onDuplicateSuccess()
|
onDuplicateSuccess()
|
||||||
notifications.success("App duplicated successfully")
|
notifications.success("App duplicated successfully")
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue