mythix 2.4.3 → 2.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mythix",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "Mythix is a NodeJS web-app framework",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -183,13 +183,13 @@ class ControllerBase {
183
183
  this.responseStatusCode = parseInt(code, 10);
184
184
  }
185
185
 
186
- async handleIncomingRequest(request, response, { route, controllerMethod, startTime, params, query /* , controller, controllerInstance, */ }) {
187
- this.route = route;
186
+ async handleIncomingRequest(request, response, args) {
187
+ this.route = args.route;
188
188
 
189
- if (typeof this[controllerMethod] !== 'function')
190
- this.throwInternalServerError(`Specified route handler named "${this.constructor.name}::${controllerMethod}" not found.`);
189
+ if (typeof this[args.controllerMethod] !== 'function')
190
+ this.throwInternalServerError(`Specified route handler named "${this.constructor.name}::${args.controllerMethod}" not found.`);
191
191
 
192
- return await this[controllerMethod].call(this, { params, query, body: request.body, request, response, startTime }, this.getModels());
192
+ return await this[args.controllerMethod].call(this, { body: request.body, request, response, ...args }, this.getModels());
193
193
  }
194
194
 
195
195
  async handleOutgoingResponse(_controllerResult, request, response /*, { route, controller, controllerMethod, controllerInstance, startTime, params } */) {