@xuda.io/xuda-dbs-plugin-xuda 1.0.88 → 1.0.90
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.
- package/package.json +1 -1
- package/server.js +11 -1
package/package.json
CHANGED
package/server.js
CHANGED
@@ -670,7 +670,7 @@ const query_db = async function (e, db, app_id_reference, table_obj) {
|
|
670
670
|
for (const [key, val] of Object.entries(opt.fields)) {
|
671
671
|
opt.fields[key] = "udfData.data." + val;
|
672
672
|
}
|
673
|
-
if (!e
|
673
|
+
if (!e?.sort_fields?.length) {
|
674
674
|
// added 2021 09 10
|
675
675
|
if (opt.sort) {
|
676
676
|
for (const [key, val] of Object.entries(opt.sort)) {
|
@@ -680,6 +680,16 @@ const query_db = async function (e, db, app_id_reference, table_obj) {
|
|
680
680
|
}
|
681
681
|
}
|
682
682
|
}
|
683
|
+
// if (!e.sort_fields || !JSON.parse(e.sort_fields).length) {
|
684
|
+
// // added 2021 09 10
|
685
|
+
// if (opt.sort) {
|
686
|
+
// for (const [key, val] of Object.entries(opt.sort)) {
|
687
|
+
// opt.sort[key] = {
|
688
|
+
// ["udfData.data." + val]: e.sortOrder === "des" ? "desc" : "asc",
|
689
|
+
// };
|
690
|
+
// }
|
691
|
+
// }
|
692
|
+
// }
|
683
693
|
|
684
694
|
var selector_new = {};
|
685
695
|
|