mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
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:
parent
70343f7923
commit
bf90733ce1
@ -84,7 +84,7 @@ module.exports = function MembersApi({
|
|||||||
return users.get({id: signedin})
|
return users.get({id: signedin})
|
||||||
.then(member => encodeToken({
|
.then(member => encodeToken({
|
||||||
sub: member.id,
|
sub: member.id,
|
||||||
plans: member.subscriptions.map(sub => sub.plan),
|
plans: member.plans,
|
||||||
exp: tokenLength,
|
exp: tokenLength,
|
||||||
aud: audience
|
aud: audience
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user