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(lib): use async/await #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maximilianoforlenza
Copy link
Member

refactor(lib): use async/await

lib/services/user.js Show resolved Hide resolved
lib/services/user.js Outdated Show resolved Hide resolved
@maximilianoforlenza maximilianoforlenza changed the title refactor(lib): use async/await WIP: refactor(lib): use async/await Jan 15, 2019
@maximilianoforlenza maximilianoforlenza changed the title WIP: refactor(lib): use async/await refactor(lib): use async/await Jan 16, 2019
if (response.statusCode === 401) {
const token = await refreshToken();
_token = token;
return send(options);
Copy link
Contributor

Choose a reason for hiding this comment

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

response = await send(options):
if (statusCode === 400) {
  throw new Error();
}
return response.body;

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