Browse Source
Merge pull request #4024 from Budibase/403-template-test-fix
Test fix
master
Martin McKeaveney
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
4 deletions
-
packages/builder/src/builderStore/api.js
-
packages/builder/src/pages/builder/portal/apps/index.svelte
|
|
|
@ -1,7 +1,6 @@ |
|
|
|
import { store } from "./index" |
|
|
|
import { get as svelteGet } from "svelte/store" |
|
|
|
import { removeCookie, Cookies } from "./cookies" |
|
|
|
import { notifications } from "@budibase/bbui" |
|
|
|
|
|
|
|
const apiCall = |
|
|
|
method => |
|
|
|
@ -15,9 +14,6 @@ const apiCall = |
|
|
|
}) |
|
|
|
if (resp.status === 403) { |
|
|
|
if (url.includes("/api/templates")) { |
|
|
|
notifications.error( |
|
|
|
"There was a problem loading quick start templates." |
|
|
|
) |
|
|
|
return { json: () => [] } |
|
|
|
} |
|
|
|
removeCookie(Cookies.Auth) |
|
|
|
|
|
|
|
@ -274,6 +274,9 @@ |
|
|
|
onMount(async () => { |
|
|
|
await apps.load() |
|
|
|
await templates.load() |
|
|
|
if ($templates?.length === 0) { |
|
|
|
notifications.error("There was a problem loading quick start templates.") |
|
|
|
} |
|
|
|
// if the portal is loaded from an external URL with a template param |
|
|
|
const initInfo = await auth.getInitInfo() |
|
|
|
if (initInfo?.init_template) { |
|
|
|
|