Extract query validation logic

This commit is contained in:
Drew Gross
2016-05-18 18:05:04 -07:00
parent ea09213511
commit 15fc186a51
4 changed files with 38 additions and 43 deletions

View File

@@ -24,7 +24,7 @@ export class GlobalConfigRouter extends PromiseRouter {
return acc;
}, {});
let database = req.config.database.WithoutValidation();
return database.update('_GlobalConfig', {_id: 1}, update, {upsert: true}).then(() => {
return database.update('_GlobalConfig', {objectId: 1}, update, {upsert: true}).then(() => {
return Promise.resolve({ response: { result: true } });
});
}