configurapi-handler-json
Advanced tools
Comparing version 1.0.14 to 1.0.15
{ | ||
"name": "configurapi-handler-json", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Configurapi request handlers for JSON requests/responses", | ||
@@ -5,0 +5,0 @@ "main": "src/index", |
@@ -6,3 +6,3 @@ const JsonResponse = require('./jsonResponse'); | ||
{ | ||
constructor(collection, start = 0, statusCode = 200, headers = {}) | ||
constructor(collection, additionalProperties = {}, statusCode = 200, headers = {}) | ||
{ | ||
@@ -15,5 +15,6 @@ if(collection && collection.constructor !== Array) | ||
let total = collection ? collection.length : 0; | ||
super({start: start, total: total, items: collection}, statusCode, headers); | ||
let start = 0; | ||
super(Object.assign({start: start, total: total, items: collection}, additionalProperties), statusCode, headers); | ||
} | ||
}; |
6262
139