@janiscommerce/api-get
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -8,2 +8,6 @@ # Changelog | ||
## [1.2.1] - 2019-08-28 | ||
### Added | ||
- Now the format in process method awaits a promise | ||
## [1.2.0] - 2019-08-27 | ||
@@ -10,0 +14,0 @@ ### Added |
@@ -44,3 +44,3 @@ 'use strict'; | ||
const response = this.format ? this.format(record[0]) : record[0]; | ||
const response = this.format ? await this.format(record[0]) : record[0]; | ||
@@ -47,0 +47,0 @@ this.setBody(response); |
{ | ||
"name": "@janiscommerce/api-get", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A package to handle JANIS Get APIs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,2 +21,10 @@ # API Get | ||
get fieldsToSelect() { | ||
return [ | ||
'id', | ||
'name', | ||
'status' | ||
]; | ||
} | ||
async format(record) { | ||
@@ -41,3 +49,3 @@ return { | ||
Both methods are optional | ||
All methods are optional | ||
@@ -44,0 +52,0 @@ # Get APIs with parents |
6421
55