Browse Source

fix: public data api response correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5239/head
Pranav C 2 years ago
parent
commit
2f80ac4530
  1. 3
      packages/nocodb/src/lib/controllers/public/publicDataApis.ts

3
packages/nocodb/src/lib/controllers/public/publicDataApis.ts

@ -10,7 +10,7 @@ export async function dataList(req: Request, res: Response) {
password: req.headers?.['xc-password'] as string,
sharedViewUuid: req.params.sharedViewUuid,
});
res.json(pagedResponse);
res.json({ data: pagedResponse });
}
// todo: Handle the error case where view doesnt belong to model
@ -23,6 +23,7 @@ async function groupedDataList(req: Request, res: Response) {
});
res.json(groupedData);
}
async function dataInsert(req: Request & { files: any[] }, res: Response) {
const insertResult = await publicDataService.dataInsert({
sharedViewUuid: req.params.sharedViewUuid,

Loading…
Cancel
Save