Browse Source

fix(api): correction in table count and sharedViewCount

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3962/head
Pranav C 2 years ago
parent
commit
0657471051
  1. 7
      packages/nocodb/src/lib/meta/api/utilApis.ts
  2. 6
      scripts/sdk/swagger.json

7
packages/nocodb/src/lib/meta/api/utilApis.ts

@ -291,7 +291,10 @@ export async function getAggregatedMetaInfo(_req: Request, res: Response) {
if (view.uuid) out.sharedKanbanCount++;
}
if (view.uuid && view.password) out.sharedLockedCount++;
if (view.uuid) {
if (view.password) out.sharedLockedCount++;
out.sharedTotal++;
}
return out;
},
@ -339,7 +342,7 @@ export async function getAggregatedMetaInfo(_req: Request, res: Response) {
);
return {
tableCount: { table: tableCount.status, view: dbViewCount },
tableCount: { table: tableCount, view: dbViewCount },
external: !project.is_meta,
viewCount,
webhookCount,

6
scripts/sdk/swagger.json

@ -5405,7 +5405,7 @@
"sharedTotal": {
"type": "integer"
},
"sharedPasswordProtected": {
"sharedLockedCount": {
"type": "integer"
}
}
@ -5463,7 +5463,7 @@
"sharedGalleryCount": 0,
"sharedKanbanCount": 0,
"sharedTotal": 0,
"sharedPasswordProtected": 0
"sharedLockedCount": 0
},
"webhookCount": 0,
"filterCount": 0,
@ -5483,7 +5483,7 @@
},
"examples": {
"example-1": {
"value": "{\n \"projectCount\": 1,\n \"projects\": [\n {\n \"tableCount\": {\n \"table\": 3,\n \"view\": 0\n },\n \"viewCount\": {\n \"formCount\": 0,\n \"gridCount\": 3,\n \"galleryCount\": 0,\n \"kanbanCount\": 0,\n \"total\": 3,\n \"sharedFormCount\": 0,\n \"sharedGridCount\": 0,\n \"sharedGalleryCount\": 0,\n \"sharedKanbanCount\": 0,\n \"sharedTotal\": 0,\n \"sharedPasswordProtected\": 0\n },\n \"webhookCount\": 0,\n \"filterCount\": 0,\n \"sortCount\": 0,\n \"rowCount\": [\n {\n \"TotalRecords\": \"76\"\n }\n ],\n \"userCount\": 1\n }\n ],\n \"userCount\": 1,\n \"sharedBaseCount\": 0\n}"
"value": "{\n \"projectCount\": 1,\n \"projects\": [\n {\n \"tableCount\": {\n \"table\": 3,\n \"view\": 0\n },\n \"viewCount\": {\n \"formCount\": 0,\n \"gridCount\": 3,\n \"galleryCount\": 0,\n \"kanbanCount\": 0,\n \"total\": 3,\n \"sharedFormCount\": 0,\n \"sharedGridCount\": 0,\n \"sharedGalleryCount\": 0,\n \"sharedKanbanCount\": 0,\n \"sharedTotal\": 0,\n \"sharedLockedCount\": 0\n },\n \"webhookCount\": 0,\n \"filterCount\": 0,\n \"sortCount\": 0,\n \"rowCount\": [\n {\n \"TotalRecords\": \"76\"\n }\n ],\n \"userCount\": 1\n }\n ],\n \"userCount\": 1,\n \"sharedBaseCount\": 0\n}"
}
}
}

Loading…
Cancel
Save