feat: Adding categories to public-vehicles/location
This commit is contained in:
@@ -42,7 +42,8 @@ const getListLocations = async(req, res) => {
|
||||
"last_location_geo",
|
||||
"driver",
|
||||
"updatedAt",
|
||||
"status"
|
||||
"status",
|
||||
"categories"
|
||||
];
|
||||
const { elements } = getPagination( req.query );
|
||||
const page = 0;// No pagination allowed to this endpoint
|
||||
@@ -55,7 +56,7 @@ const getListLocations = async(req, res) => {
|
||||
|
||||
const objQuery = await generic.getListQuery( page , query_elements, filter, select );
|
||||
|
||||
const data = await objQuery.query.sort("field -updatedAt").exec();
|
||||
const data = await objQuery.query.sort("field -updatedAt").populate("categories").exec();
|
||||
|
||||
const retVal = {
|
||||
total : objQuery.total,
|
||||
|
||||
Reference in New Issue
Block a user