0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Updated getMagicLink call to handle Promise return

no-issue

refs: https://github.com/TryGhost/Members/commit/63942f03

The above commit updated all magic-link methods to be async, this change
ensures that we will handle a Promise return when it's updated in Ghost.
`await` has no effect on non Promise return values so it's safe to add
this now.
This commit is contained in:
Fabien O'Carroll 2020-09-17 17:55:00 +01:00 committed by Fabien 'egg' O'Carroll
parent d0844ee853
commit fe1e480e2e

View file

@ -19,7 +19,7 @@ module.exports = {
});
}
const magicLink = membersService.api.getMagicLink(model.get('email'));
const magicLink = await membersService.api.getMagicLink(model.get('email'));
return {
member_id: model.get('id'),