ee-soa-service
Advanced tools
Comparing version 0.1.17 to 0.1.18
@@ -204,2 +204,4 @@ | ||
entities = entities.toJSON(); | ||
// SUBREQUESTS | ||
@@ -448,7 +450,7 @@ if(subRequests.length && entities.length) { | ||
var refId = subEntity[this.specs.belongsTo[collection].targetColumn]; | ||
log(refId); | ||
if(map[refId]) { | ||
if(map[refId][collection]) { | ||
map[refId][collection].push(subEntity); | ||
} | ||
// before if(map[refId][collection]) map[refId][collection].push(subEntity); | ||
if(!map[refId][collection]) map[refId][collection] = []; | ||
map[refId][collection].push(subEntity); | ||
} | ||
@@ -455,0 +457,0 @@ }.bind(this)); |
@@ -11,2 +11,3 @@ | ||
, SOAResponse = require('ee-soa-response') | ||
, type = require('ee-types') | ||
, argv = require('ee-argv') | ||
@@ -109,2 +110,4 @@ , debug = argv.has('dev-service'); | ||
if(data) { | ||
if(type.function(data.toJSON)) data = data.toJSON(); | ||
if(debug) log('send data to response', data); | ||
@@ -111,0 +114,0 @@ |
@@ -5,3 +5,3 @@ { | ||
, "keywords" : ["ee", "soa", "service"] | ||
, "version" : "0.1.17" | ||
, "version" : "0.1.18" | ||
, "author": { | ||
@@ -8,0 +8,0 @@ "name" : "Tobias Kneubuehler" |
58926
1028