Updated token generation to use plans on member

no-issue

This is to remove duplication of logic, that now lives solely in the
getMember method
This commit is contained in:
Fabien O'Carroll 2019-04-25 13:15:11 +02:00
parent 239237f402
commit 79f31b7323

View File

@ -84,7 +84,7 @@ module.exports = function MembersApi({
return users.get({id: signedin})
.then(member => encodeToken({
sub: member.id,
plans: member.subscriptions.map(sub => sub.plan),
plans: member.plans,
exp: tokenLength,
aud: audience
}));