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:
parent
96e0e3fcaf
commit
392bb412d2
1 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue