@dewib/dw-api
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [2.5.0](https://github.com/gaetansenn/dw-api/compare/v2.4.0...v2.5.0) (2022-03-23) | ||
### Features | ||
* inject extra data to methods ([510d3f8](https://github.com/gaetansenn/dw-api/commit/510d3f8a71263f2a505414535dae7359c41edfeb)) | ||
## [2.4.0](https://github.com/gaetansenn/dw-api/compare/v2.3.0...v2.4.0) (2022-03-10) | ||
@@ -7,0 +14,0 @@ |
@@ -26,3 +26,3 @@ import { isObject, camelCase, isEmpty, isString, get } from 'lodash' | ||
get (url, { fields, queryParams, multi, headers, scope } = {}) { | ||
get (url, { fields, queryParams, multi, headers, scope, ...extra } = {}) { | ||
return this.handleRequest({ | ||
@@ -35,7 +35,8 @@ method: 'get', | ||
multi, | ||
scope | ||
scope, | ||
...extra | ||
}) | ||
} | ||
post (url, body, { fields, queryParams, multi, headers, scope } = {}) { | ||
post (url, body, { fields, queryParams, multi, headers, scope, ...extra } = {}) { | ||
return this.handleRequest({ | ||
@@ -49,7 +50,8 @@ method: 'post', | ||
multi, | ||
scope | ||
scope, | ||
...extra | ||
}) | ||
} | ||
delete (url, { fields, queryParams, multi, headers, scope, body = null } = {}) { | ||
delete (url, { fields, queryParams, multi, headers, scope, body = null, ...extra } = {}) { | ||
return this.handleRequest({ | ||
@@ -63,7 +65,8 @@ method: 'delete', | ||
multi, | ||
scope | ||
scope, | ||
...extra | ||
}) | ||
} | ||
patch (url, body, { fields, queryParams, multi, headers, scope } = {}) { | ||
patch (url, body, { fields, queryParams, multi, headers, scope, ...extra } = {}) { | ||
return this.handleRequest({ | ||
@@ -77,3 +80,4 @@ method: 'patch', | ||
multi, | ||
scope | ||
scope, | ||
...extra | ||
}) | ||
@@ -80,0 +84,0 @@ } |
{ | ||
"name": "@dewib/dw-api", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Wrap all your request into one place and map your response for your needs", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
13179
211