fix nosql ordering

This commit is contained in:
Jan Prochazka 2024-08-20 14:21:23 +02:00
parent 76c8f8ef62
commit 781d6f1585
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@
if (sort?.length > 0) {
return sort.map(col => ({
columnName: col.uniqueName,
order: col.order,
direction: col.order,
}));
}

View File

@ -175,7 +175,7 @@ function convertToMongoSort(sort) {
if (!sort) return null;
return _zipObject(
sort.map((col) => col.columnName),
sort.map((col) => (col.order == 'DESC' ? -1 : 1))
sort.map((col) => (col.direction == 'DESC' ? -1 : 1))
);
}