zet-lib 1.0.25 → 1.0.27
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/lib/zGeneratorRouter.js +2 -2
- package/package.json +1 -1
package/lib/zGeneratorRouter.js
CHANGED
|
@@ -73,7 +73,6 @@ router.get('/', csrfProtection, async (req, res) => {
|
|
|
73
73
|
sorting: sorting,
|
|
74
74
|
lock: lock,
|
|
75
75
|
routeName:res.locals.routeName,
|
|
76
|
-
bodyHTML : body,
|
|
77
76
|
//endHTML : Util.readFile(`./views/generatorjs.ejs`)
|
|
78
77
|
renderBody: "zgenerator/index.ejs",
|
|
79
78
|
renderEnd: "zgenerator/indexjs.ejs"
|
|
@@ -1098,6 +1097,7 @@ Scanning relation id to name
|
|
|
1098
1097
|
const scanning = async (MYMODEL) => {
|
|
1099
1098
|
//let MYMODEL = require(`./../models/${table}`);
|
|
1100
1099
|
//console.log(JSON.stringify(MYMODEL))
|
|
1100
|
+
const MYMODELS = zRoute.MYMODELS();
|
|
1101
1101
|
let table = MYMODEL.table;
|
|
1102
1102
|
const widgets = MYMODEL.widgets;
|
|
1103
1103
|
const not_scanning = ['created_by', 'updated_by'];
|
|
@@ -1113,7 +1113,7 @@ const scanning = async (MYMODEL) => {
|
|
|
1113
1113
|
if (arr.length) {
|
|
1114
1114
|
let str = Util.replaceAll(arr[0], '"', '');
|
|
1115
1115
|
let mysplits = str.indexOf(',') > -1 ? str.split(',') : [str];
|
|
1116
|
-
let MYMODEL_TABLE =
|
|
1116
|
+
let MYMODEL_TABLE = MYMODELS[widgets[key].table];
|
|
1117
1117
|
let widgetsRelations = MYMODEL_TABLE.widgets;
|
|
1118
1118
|
let relationsKeys = [];
|
|
1119
1119
|
let relationsKeysObject = {}
|