@vasrefil/api-toolkit 1.10.5 → 1.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -156,7 +156,7 @@ class QueryHelper_ {
|
|
|
156
156
|
get_sort(query) {
|
|
157
157
|
try {
|
|
158
158
|
const { key, value } = query.sort ? this.str_to_obj(query.sort) : {};
|
|
159
|
-
const single_sort = { [key || 'createdAt']: value ||
|
|
159
|
+
const single_sort = { [key || 'createdAt']: value || -1 };
|
|
160
160
|
const sorts = query.sorts ? this.str_to_obj(query.sorts) : {};
|
|
161
161
|
const sort = Object.values(sorts).length ? sorts : single_sort;
|
|
162
162
|
return sort;
|