zet-lib 1.0.16 → 1.0.17
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/zPage.js +3 -4
- package/lib/zRoute.js +1 -1
- package/package.json +1 -1
package/lib/zPage.js
CHANGED
|
@@ -54,8 +54,7 @@ const csrfProtection = csrf({cookie: true});
|
|
|
54
54
|
const fs = require('fs-extra');
|
|
55
55
|
const qs = require('qs');
|
|
56
56
|
const axios = require('axios');
|
|
57
|
-
const
|
|
58
|
-
const {zRoute, zRole, connection, Util, io, zCache, debug, moduleLib, zFunction } = require('zet-lib');
|
|
57
|
+
const {zRoute, zRole, connection, Util, io, zCache, myCache, debug, moduleLib, zFunction, zFn, Mail } = require('zet-lib');
|
|
59
58
|
|
|
60
59
|
`;
|
|
61
60
|
};
|
|
@@ -77,7 +76,7 @@ zpage.createRoute = (obj, token, layoutObj) => {
|
|
|
77
76
|
let renderDataforGet = "";
|
|
78
77
|
let routerforGet = "";
|
|
79
78
|
if (obj.method == 1) {
|
|
80
|
-
renderDataforGet = `renderData.csrfToken = req.csrfToken()
|
|
79
|
+
renderDataforGet = `renderData.csrfToken = req.csrfToken();`;
|
|
81
80
|
routerforGet = "csrfProtection, "
|
|
82
81
|
}
|
|
83
82
|
let commonData = {
|
|
@@ -130,7 +129,7 @@ zpage.createRoute = (obj, token, layoutObj) => {
|
|
|
130
129
|
}
|
|
131
130
|
let scripts = `router.${METHOD[obj.method]}('${obj.page}', ${routerforGet} async(req,res) => {
|
|
132
131
|
try {
|
|
133
|
-
let renderData = {}
|
|
132
|
+
let renderData = {};
|
|
134
133
|
let commonData = ${JSON.stringify(commonData)};
|
|
135
134
|
commonData.updated_at = Util.now();
|
|
136
135
|
commonData.created_at = Util.now();
|
package/lib/zRoute.js
CHANGED
|
@@ -3329,7 +3329,7 @@ module.exports = (req, res, next) => {`;
|
|
|
3329
3329
|
if (err) {
|
|
3330
3330
|
console.log(err.toString());
|
|
3331
3331
|
}
|
|
3332
|
-
pm2.restart(process.env.
|
|
3332
|
+
pm2.restart(process.env.PM2_NAME, (err, proc) => {
|
|
3333
3333
|
//io.to(room).emit("message","Restart done")
|
|
3334
3334
|
});
|
|
3335
3335
|
});
|