mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Updated frontend routing to include products for page/post
refs https://github.com/TryGhost/Team/issues/1071 - `products` relation is needed on post/page to tackle custom tiers visibility, this change attaches `products` as default include for frontend controllers
This commit is contained in:
parent
15d692dc01
commit
93596a1375
@ -18,7 +18,7 @@ module.exports = function emailPostController(req, res, next) {
|
||||
|
||||
const params = {
|
||||
uuid: req.params.uuid,
|
||||
include: 'authors,tags',
|
||||
include: 'authors,tags,tiers',
|
||||
context: {
|
||||
member: res.locals.member
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ module.exports = function previewController(req, res, next) {
|
||||
const params = {
|
||||
uuid: req.params.uuid,
|
||||
status: 'all',
|
||||
include: 'authors,tags'
|
||||
include: 'authors,tags,tiers'
|
||||
};
|
||||
|
||||
return api[res.routerOptions.query.controller]
|
||||
|
@ -13,7 +13,7 @@ function processQuery(query, locals) {
|
||||
// We override the `include` property for now, because the full data set is required anyway.
|
||||
if (_.get(query, 'resource') === 'posts' || _.get(query, 'resource') === 'pages') {
|
||||
_.extend(query.options, {
|
||||
include: 'authors,tags'
|
||||
include: 'authors,tags,tiers'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ function entryLookup(postUrl, routerOptions, locals) {
|
||||
}
|
||||
|
||||
let options = {
|
||||
include: 'authors,tags'
|
||||
include: 'authors,tags,tiers'
|
||||
};
|
||||
|
||||
options.context = {member: locals.member};
|
||||
|
@ -19,7 +19,7 @@ const queryDefaults = {
|
||||
*/
|
||||
const defaultQueryOptions = {
|
||||
options: {
|
||||
include: 'authors,tags'
|
||||
include: 'authors,tags,tiers'
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user