Fix CLI regressions and refactor

This commit is contained in:
Typicode
2015-07-23 08:04:29 +02:00
parent 756b8b4823
commit a49db2c5c3
5 changed files with 73 additions and 36 deletions

View File

@ -122,6 +122,7 @@ module.exports = function (db, name) {
if (otherResource
&& otherResource.trim().length > 0
&& db.object[otherResource]) {
var query = {}
var prop = pluralize.singular(name) + 'Id'
query[prop] = id