From b67f96eeb87e9c24f2597fa840d4e5f6eb9198b8 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 20 Aug 2022 11:48:52 +0800 Subject: [PATCH] fix(gui-v2): includeM2M display --- .../components/dashboard/settings/UIAcl.vue | 3 +-- packages/nocodb/src/lib/meta/api/tableApis.ts | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue b/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue index dc3db3578a..f588b4e2b5 100644 --- a/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue +++ b/packages/nc-gui-v2/components/dashboard/settings/UIAcl.vue @@ -32,8 +32,7 @@ async function loadTableList() { isLoading = true tables = await $api.project.modelVisibilityList(project.value?.id, { - // FIXME: type - includeM2M: includeM2M.value || '', + includeM2M: includeM2M.value, }) } catch (e) { console.error(e) diff --git a/packages/nocodb/src/lib/meta/api/tableApis.ts b/packages/nocodb/src/lib/meta/api/tableApis.ts index a68515ffaf..45ea1968c8 100644 --- a/packages/nocodb/src/lib/meta/api/tableApis.ts +++ b/packages/nocodb/src/lib/meta/api/tableApis.ts @@ -77,14 +77,13 @@ export async function tableList(req: Request, res: Response) { }) ).filter((t) => tableViewMapping[t.id]); - res // todo: pagination - .json( - new PagedResponseImpl( - req.query?.includeM2M - ? tableList - : (tableList.filter((t) => !t.mm) as Model[]) - ) - ); + res.json( + new PagedResponseImpl( + req.query?.includeM2M === 'true' + ? tableList + : (tableList.filter((t) => !t.mm) as Model[]) + ) + ); } export async function tableCreate(req: Request, res) {