No need to transform post-transform keys in mongo adapter
This commit is contained in:
@@ -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: {} } };
|
||||
|
||||
Reference in New Issue
Block a user