@ccci/micro-server 1.0.176 → 1.0.178
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/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -297662,7 +297662,13 @@ function ConstructQuery(query) {
|
|
|
297662
297662
|
let pair = nested2[1].split(":");
|
|
297663
297663
|
let associationkey = pair[0];
|
|
297664
297664
|
association.through = { where: {} };
|
|
297665
|
-
|
|
297665
|
+
let value = pair[1];
|
|
297666
|
+
if (pair[1].indexOf("[") > -1 && pair[1].indexOf("]") > -1 && pair[1].indexOf(";") > -1) {
|
|
297667
|
+
value = JSON.parse(value.replaceAll(";", ","));
|
|
297668
|
+
} else {
|
|
297669
|
+
value = JSON.parse(pair[1]);
|
|
297670
|
+
}
|
|
297671
|
+
association.through.where[associationkey] = value;
|
|
297666
297672
|
association.required = true;
|
|
297667
297673
|
Logger.info(`association.where: ${JSON.stringify(association)}`);
|
|
297668
297674
|
}
|
|
@@ -297683,7 +297689,6 @@ function ConstructQuery(query) {
|
|
|
297683
297689
|
}
|
|
297684
297690
|
includes.push(temp);
|
|
297685
297691
|
});
|
|
297686
|
-
Logger.info(`INCLUDES: ${JSON.stringify(includes)}`);
|
|
297687
297692
|
options.includes = includes;
|
|
297688
297693
|
}
|
|
297689
297694
|
if (query.paranoid) {
|
|
@@ -297793,7 +297798,6 @@ class BaseController {
|
|
|
297793
297798
|
try {
|
|
297794
297799
|
let query = req.query;
|
|
297795
297800
|
let options = ConstructQuery(query);
|
|
297796
|
-
Logger.info(`WHERE CLAUSE: ${JSON.stringify(options.where)}`);
|
|
297797
297801
|
let response4 = null;
|
|
297798
297802
|
if (!response4) {
|
|
297799
297803
|
response4 = await this._model?.findAndCountAll({
|