Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(api): prefer async/await in lib/routes/account.js #3655

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

chenba
Copy link
Contributor

@chenba chenba commented Dec 12, 2019

Part of #2305

@mozilla/fxa-devs r?

@chenba chenba changed the title WIP #2305 account route async/await refactor(api): prefer async/await in lib/routes/account.js Dec 12, 2019
@chenba chenba marked this pull request as ready for review December 12, 2019 21:32
Copy link
Contributor

@lmorchard lmorchard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, makes sense, tests pass!

secondaryEmailRecord.email
);
await customs.check(request, email, 'accountCreate');
await deleteAccountIfUnverified();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of wish we'd un-wrap & inline all these functions along the way to await-ifying & simplifying things.

But, on the other hand, I guess this kind of serves as a table-of-contents for the functionality. Also makes the conversion safer and smaller.

So, I'm mainly thinking out loud and this is not even a nit.

@chenba chenba merged commit 6b98373 into mozilla:master Dec 17, 2019
@chenba chenba deleted the 2305-async-await-account branch December 17, 2019 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants