From bf90733ce13ca9a28c660adcf036ecd4a1d3d968 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Thu, 25 Apr 2019 13:15:11 +0200 Subject: [PATCH] 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 --- core/server/lib/members/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/lib/members/index.js b/core/server/lib/members/index.js index de9d293318..a74f0a565e 100644 --- a/core/server/lib/members/index.js +++ b/core/server/lib/members/index.js @@ -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 }));