Fixed sort in tenant
MODIFY
src/server/rest/v1/service/UtilsService.ts
src/server/rest/v1/service/UtilsService.ts
@@ -149,10 +149,6 @@ export default class UtilsService {
const dbSortField: any = {};
// Sanitize
const sortFields = httpSortFields.split('|');
- // Array?
- if (httpSortFields.length > 0) {
- // Init
- dbSortField.Sort = {};
// Build
for (let sortField of sortFields) {
// Order
@@ -167,8 +163,7 @@ export default class UtilsService {
sortField = '_id';
}
// Set
- dbSortField.Sort[sortField] = order;
- }
+ dbSortField[sortField] = order;
}
return dbSortField;
}

Fixed sort in tenant