Browse Source

fix(nc-gui): pass shared base id to loadProjectRoles

pull/3703/head
braks 2 years ago
parent
commit
fee34c1233
  1. 6
      packages/nc-gui/composables/useProject.ts
  2. 4
      packages/nc-gui/composables/useRoles/index.ts

6
packages/nc-gui/composables/useProject.ts

@ -100,7 +100,11 @@ const [setup, use] = useInjectionState((_projectId?: MaybeRef<string>) => {
return
}
await loadProjectRoles(project.value.id || (route.params.projectId as string), isSharedBase.value)
await loadProjectRoles(
project.value.id || (route.params.projectId as string),
isSharedBase.value,
route.params.projectId as string,
)
await loadTables()

4
packages/nc-gui/composables/useRoles/index.ts

@ -37,7 +37,7 @@ export const useRoles = createSharedComposable(() => {
...projectRoles.value,
}))
async function loadProjectRoles(projectId: string, isSharedBase: boolean) {
async function loadProjectRoles(projectId: string, isSharedBase?: boolean, sharedBaseId?: string) {
projectRoles.value = {}
if (isSharedBase) {
@ -45,7 +45,7 @@ export const useRoles = createSharedComposable(() => {
{},
{
headers: {
'xc-shared-base-id': projectId,
'xc-shared-base-id': sharedBaseId,
},
},
)

Loading…
Cancel
Save