@seidor-cloud-produtos/orbit-backend-lib 0.0.43 → 0.0.44

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.
@@ -12,4 +12,5 @@ export declare class ExpressMappingModel extends MappingModel {
12
12
  protected deleteParams(): this;
13
13
  protected setBody(): this;
14
14
  protected next(): void;
15
+ protected setMethod(): MappingModel;
15
16
  }
@@ -39,5 +39,11 @@ class ExpressMappingModel extends mapping_model_1.MappingModel {
39
39
  next() {
40
40
  return this.controller.next();
41
41
  }
42
+ setMethod() {
43
+ if (this.getHeaders()['x-http-method-override'])
44
+ this.controller.request.method =
45
+ this.getHeaders()['x-http-method-override'];
46
+ return this;
47
+ }
42
48
  }
43
49
  exports.ExpressMappingModel = ExpressMappingModel;
@@ -27,4 +27,5 @@ export declare abstract class MappingModel {
27
27
  protected abstract setPathParams(key: string, value: string): MappingModel;
28
28
  protected abstract next(): any;
29
29
  parse(): any;
30
+ protected abstract setMethod(): MappingModel;
30
31
  }
@@ -27,6 +27,7 @@ class MappingModel {
27
27
  return this.setHeader('authorizations', params.context.authorizations)
28
28
  .deleteParams()
29
29
  .setBody()
30
+ .setMethod()
30
31
  .next();
31
32
  }
32
33
  }
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, '__esModule', { value: true });
3
3
  const mapping_model_1 = require('./mapping-model');
4
4
  class MockMappingModel extends mapping_model_1.MappingModel {
5
+ setMethod() {
6
+ return this;
7
+ }
5
8
  setBody() {
6
9
  return this;
7
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "Internal lib for backend components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",