|
|
@ -13,7 +13,6 @@ import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
|
|
|
|
|
|
|
|
|
|
|
// todo: Handle the error case where view doesnt belong to model
|
|
|
|
// todo: Handle the error case where view doesnt belong to model
|
|
|
|
async function dataList(req: Request, res: Response) { |
|
|
|
async function dataList(req: Request, res: Response) { |
|
|
|
// BOOKMARK
|
|
|
|
|
|
|
|
const { model, view } = await getViewAndModelFromRequestByAliasOrId(req); |
|
|
|
const { model, view } = await getViewAndModelFromRequestByAliasOrId(req); |
|
|
|
res.json(await getDataList(model, view, req)); |
|
|
|
res.json(await getDataList(model, view, req)); |
|
|
|
} |
|
|
|
} |
|
|
@ -129,7 +128,6 @@ async function getDataList(model, view: View, req) { |
|
|
|
// e.g. search some text in a numeric field
|
|
|
|
// e.g. search some text in a numeric field
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// BOOKMARK
|
|
|
|
|
|
|
|
return new PagedResponseImpl(data, { |
|
|
|
return new PagedResponseImpl(data, { |
|
|
|
...req.query, |
|
|
|
...req.query, |
|
|
|
count, |
|
|
|
count, |
|
|
|