mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
🐛 Allowed data to be read from root of specified key for static pages (#10449)
refs #10434
This commit is contained in:
parent
38705ef91c
commit
8e75267bbb
1 changed files with 5 additions and 3 deletions
|
@ -38,10 +38,12 @@ module.exports = function staticController(req, res, next) {
|
|||
response.data = {};
|
||||
|
||||
_.each(res.routerOptions.data, function (config, name) {
|
||||
response.data[name] = result[name][config.resource];
|
||||
|
||||
if (config.type === 'browse') {
|
||||
response.data[name] = result[name];
|
||||
} else {
|
||||
response.data[name] = result[name][config.resource];
|
||||
response.data[name].meta = result[name].meta;
|
||||
// @TODO: remove in v3
|
||||
response.data[name][config.resource] = result[name][config.resource];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue