1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

Creator bug fix was not commited

This commit is contained in:
Dean 2024-03-11 09:32:13 +00:00
parent c5753dab0a
commit 9f29a2c3d9
2 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -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) {