@pxp-nd/core 1.2.87 → 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;
|
|
@@ -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;
|