Strip objectId out of responses from HooksController (#1925)

This commit is contained in:
Tyler Brock
2016-05-26 15:33:37 -07:00
parent dd1d18dbe6
commit c5e3be8b64
2 changed files with 10 additions and 1 deletions

View File

@@ -57,7 +57,12 @@ export class HooksController {
_getHooks(query = {}, limit) {
let options = limit ? { limit: limit } : undefined;
return this.database.find(DefaultHooksCollectionName, query);
return this.database.find(DefaultHooksCollectionName, query).then((results) => {
return results.map((result) => {
delete result.objectId;
return result;
});
});
}
_removeHooks(query) {