Skip to content

Commit

Permalink
Included specific member props in theme service
Browse files Browse the repository at this point in the history
no-issue

This simplifies the @member prop in themes, and includes a subscribed
property
  • Loading branch information
allouis committed Sep 10, 2019
1 parent 00604bf commit e881caa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/frontend/services/themes/middleware.js
Expand Up @@ -78,9 +78,14 @@ function updateLocalTemplateOptions(req, res, next) {
url: urlUtils.urlFor('home', {secure: req.secure, trailingSlash: false}, true)
};

const member = req.member ? {
email: req.member.email,
subscribed: req.member.plans.length !== 0
} : null;

hbs.updateLocalTemplateOptions(res.locals, _.merge({}, localTemplateOptions, {
data: {
member: req.member,
member: member,
site: siteData,
blog: siteData
}
Expand Down

0 comments on commit e881caa

Please sign in to comment.