feat: Adding categories to public-vehicles/location

This commit is contained in:
2023-11-16 19:18:51 -06:00
parent 7e3fc7367e
commit 41bbc9302e

View File

@@ -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,