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 TemplateCard from "components/common/TemplateCard.svelte"
|
||||
import { lowercase } from "helpers"
|
||||
import { sdk } from "@budibase/shared-core"
|
||||
|
||||
export let template
|
||||
|
||||
|
@ -141,6 +142,11 @@
|
|||
// Create user
|
||||
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}`)
|
||||
} catch (error) {
|
||||
creating = false
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
import { createValidationStore } from "helpers/validation/yup"
|
||||
import { writable, get } from "svelte/store"
|
||||
import * as appValidation from "helpers/validation/yup/app"
|
||||
import { appsStore } from "stores/portal"
|
||||
import { appsStore, auth } from "stores/portal"
|
||||
import { onMount } from "svelte"
|
||||
import { API } from "api"
|
||||
import { sdk } from "@budibase/shared-core"
|
||||
|
||||
export let appId
|
||||
export let appName
|
||||
|
@ -69,6 +70,10 @@
|
|||
try {
|
||||
await API.duplicateApp(data, appId)
|
||||
appsStore.load()
|
||||
if (sdk.users.isCreator($auth.user, app?.devId)) {
|
||||
// Refresh for access to created applications
|
||||
await auth.getSelf()
|
||||
}
|
||||
onDuplicateSuccess()
|
||||
notifications.success("App duplicated successfully")
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in New Issue