@ccci/micro-server 1.0.239 → 1.0.240

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -299346,6 +299346,23 @@ function ConstructQuery(query) {
299346
299346
  association.required = true;
299347
299347
  Logger.info(`association.where: ${JSON.stringify(association)}`);
299348
299348
  }
299349
+ let _injectable = queries.find((q) => q.indexOf("@") > -1 && q.indexOf(top) > -1);
299350
+ if (_injectable) {
299351
+ _injectable = _injectable.replaceAll("@", "");
299352
+ let nested2 = _injectable.split(".");
299353
+ let pair = nested2[1].split(":");
299354
+ let associationkey = pair[0];
299355
+ association.where = {};
299356
+ let value = pair[1];
299357
+ if (pair[1].indexOf("[") > -1 && pair[1].indexOf("]") > -1 && pair[1].indexOf(";") > -1) {
299358
+ value = JSON.parse(value.replaceAll(";", ","));
299359
+ } else {
299360
+ value = JSON.parse(pair[1]);
299361
+ }
299362
+ association.through.where[associationkey] = value;
299363
+ association.required = true;
299364
+ Logger.info(`association.where: ${JSON.stringify(association)}`);
299365
+ }
299349
299366
  }
299350
299367
  includes.push(association);
299351
299368
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.239",
3
+ "version": "1.0.240",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",