2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

🐛 Allowed data to be read from root of specified key for static pages (#10449)

refs #10434
This commit is contained in:
Fabien O'Carroll 2019-02-11 12:43:01 +01:00 committed by GitHub
parent 38705ef91c
commit 8e75267bbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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];
}
});
}