@pxp-nd/core 1.2.88 → 1.2.89
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.
|
@@ -164,7 +164,8 @@ class Controller {
|
|
|
164
164
|
// Execute our method for this path and pass our express request and response object.
|
|
165
165
|
// const params = { ...req.query, ...req.body, ...req.params };
|
|
166
166
|
const params = Object.assign(Object.assign({}, req.files), req.paramasMerge);
|
|
167
|
-
const controllerForRequest = Object.
|
|
167
|
+
const controllerForRequest = Object.create(Object.getPrototypeOf(this));
|
|
168
|
+
Object.assign(controllerForRequest, this);
|
|
168
169
|
controllerForRequest.user = req.user || null;
|
|
169
170
|
controllerForRequest.headers = req.headers;
|
|
170
171
|
controllerForRequest.pxpParams = req.pxpParams;
|
|
@@ -174,7 +175,7 @@ class Controller {
|
|
|
174
175
|
.toLowerCase();
|
|
175
176
|
controllerForRequest.validated = false;
|
|
176
177
|
try {
|
|
177
|
-
await index_1.__(
|
|
178
|
+
await index_1.__(controllerForRequest.genericMethodWrapper(params, req, next, res, route.methodName, methodDbSettings, readOnlyMethod, false, logKey, logValue, isHtmlMethod, isFileMethod));
|
|
178
179
|
}
|
|
179
180
|
catch (ex) {
|
|
180
181
|
const now = new Date();
|
|
@@ -197,7 +198,8 @@ class Controller {
|
|
|
197
198
|
], async (req, res, next) => {
|
|
198
199
|
// Execute our method for this path and pass our express request and response object.
|
|
199
200
|
const params = Object.assign(Object.assign({}, req.files), req.paramasMerge);
|
|
200
|
-
const controllerForRequest = Object.
|
|
201
|
+
const controllerForRequest = Object.create(Object.getPrototypeOf(this));
|
|
202
|
+
Object.assign(controllerForRequest, this);
|
|
201
203
|
controllerForRequest.user = req.user || null;
|
|
202
204
|
controllerForRequest.headers = req.headers;
|
|
203
205
|
controllerForRequest.pxpParams = req.pxpParams;
|
|
@@ -207,7 +209,7 @@ class Controller {
|
|
|
207
209
|
.toLowerCase();
|
|
208
210
|
controllerForRequest.validated = false;
|
|
209
211
|
try {
|
|
210
|
-
await index_1.__(
|
|
212
|
+
await index_1.__(controllerForRequest.genericMethodWrapper(params, req, next, res, route.methodName, methodDbSettings, readOnlyMethod, permission[route.methodName], logKey, logValue, isHtmlMethod, isFileMethod));
|
|
211
213
|
}
|
|
212
214
|
catch (ex) {
|
|
213
215
|
const now = new Date();
|