mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fix nosql ordering
This commit is contained in:
parent
76c8f8ef62
commit
781d6f1585
@ -66,7 +66,7 @@
|
||||
if (sort?.length > 0) {
|
||||
return sort.map(col => ({
|
||||
columnName: col.uniqueName,
|
||||
order: col.order,
|
||||
direction: col.order,
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user