@dewib/dw-api
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [2.6.1](https://github.com/gaetansenn/dw-api/compare/v2.6.0...v2.6.1) (2022-04-20) | ||
### Bug Fixes | ||
* fix mapping bind arguments ([4b17e94](https://github.com/gaetansenn/dw-api/commit/4b17e940065611a0655089fd39e0a169eb51a0e6)) | ||
## [2.6.0](https://github.com/gaetansenn/dw-api/compare/v2.5.0...v2.6.0) (2022-04-20) | ||
@@ -7,0 +14,0 @@ |
@@ -107,3 +107,3 @@ import { isObject, camelCase, isEmpty, isString, get } from 'lodash' | ||
response.data = response.data.map(item => this.extractModel.bind(this, fields, item, format)) | ||
response.data = response.data.map(item => this.extractModel(fields, item, format)) | ||
@@ -165,3 +165,3 @@ return (multi) ? (catchError ? [false, response.data] : response.data) : (catchError ? [false, response] : response) | ||
else return true | ||
}).map(m => this.extractModel.bind(this, field.fields, m, format, sourceModel, originModel)()) | ||
}).map(m => this.extractModel(field.fields, m, format, sourceModel, originModel)) | ||
else | ||
@@ -168,0 +168,0 @@ return this.extractModel(field.fields, sourceModel[field.key], format, sourceModel, originModel) |
{ | ||
"name": "@dewib/dw-api", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "Wrap all your request into one place and map your response for your needs", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
13840