0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Fixed broken static routes with members serverside rendering

no issue

refs cc1f62438d
This commit is contained in:
Rish 2019-02-26 12:19:05 +07:00
parent 96e0e3fcaf
commit 392bb412d2

View file

@ -1,7 +1,8 @@
const _ = require('lodash'),
Promise = require('bluebird'),
debug = require('ghost-ignition').debug('services:routing:controllers:static'),
helpers = require('../helpers');
helpers = require('../helpers'),
config = require('../../../config');
function processQuery(query, locals) {
const api = require('../../../api')[locals.apiVersion];
@ -17,11 +18,13 @@ function processQuery(query, locals) {
});
}
Object.assign(query.options, {
context: {
members: locals.member
}
});
if (config.get('enableDeveloperExperiments')) {
Object.assign(query.options, {
context: {
members: locals.member
}
});
}
// Return a promise for the api query
return api[query.controller][query.type](query.options);