mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
🐛 Fixed missing member email on unsubscribe page
no refs - The `update` method in members-api package was edited to return Model object instead of JSON directly - TryGhost/Members@a28bcc5 - This unsubscribe handler was returning the raw member object returned from `update` method, which is now a model object and not able to access `member.email` - Fix updates the unsubscribe request handler to return the member JSON again
This commit is contained in:
parent
96c18edc82
commit
696e60dd51
1 changed files with 2 additions and 1 deletions
|
@ -177,7 +177,8 @@ async function handleUnsubscribeRequest(req) {
|
|||
}
|
||||
|
||||
try {
|
||||
return await membersService.api.members.update({subscribed: false}, {id: member.id});
|
||||
const memberModel = await membersService.api.members.update({subscribed: false}, {id: member.id});
|
||||
return memberModel.toJSON();
|
||||
} catch (err) {
|
||||
throw new errors.InternalServerError({
|
||||
message: 'Failed to unsubscribe member'
|
||||
|
|
Loading…
Add table
Reference in a new issue