Browse Source

fix(gui): replace api call which requires auth token in public page

re #4694

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4696/head
Pranav C 2 years ago
parent
commit
4986a5892f
  1. 13
      packages/nc-gui/composables/useSharedView.ts

13
packages/nc-gui/composables/useSharedView.ts

@ -17,7 +17,7 @@ export function useSharedView() {
const { appInfo } = $(useGlobal()) const { appInfo } = $(useGlobal())
const { loadProject } = useProject() const { project } = useProject()
const appInfoDefaultLimit = appInfo.defaultLimit || 25 const appInfoDefaultLimit = appInfo.defaultLimit || 25
@ -76,7 +76,16 @@ export function useSharedView() {
await setMeta(viewMeta.model) await setMeta(viewMeta.model)
await loadProject(true, viewMeta.project_id) // if project is not defined then set it with an object containing base
if (!project.value?.bases)
project.value = {
bases: [
{
id: viewMeta.base_id,
type: viewMeta.client,
},
],
}
const relatedMetas = { ...viewMeta.relatedMetas } const relatedMetas = { ...viewMeta.relatedMetas }
Object.keys(relatedMetas).forEach((key) => setMeta(relatedMetas[key])) Object.keys(relatedMetas).forEach((key) => setMeta(relatedMetas[key]))

Loading…
Cancel
Save