No need to transform post-transform keys in mongo adapter

This commit is contained in:
Drew Gross
2016-04-25 20:42:19 -07:00
parent e2a3213351
commit ee8a3c94d5
6 changed files with 51 additions and 69 deletions

View File

@@ -1,12 +1,12 @@
// global_config.js
import PromiseRouter from '../PromiseRouter';
import PromiseRouter from '../PromiseRouter';
import * as middleware from "../middlewares";
export class GlobalConfigRouter extends PromiseRouter {
getGlobalConfig(req) {
let database = req.config.database.WithoutValidation();
return database.find('_GlobalConfig', { '_id': 1 }, { limit: 1 }).then((results) => {
return database.find('_GlobalConfig', { objectId: 1 }, { limit: 1 }).then((results) => {
if (results.length != 1) {
// If there is no config in the database - return empty config.
return { response: { params: {} } };