Skip to content

refactor(lib): use async/await#9

Open
maximilianoforlenza wants to merge 1 commit into
masterfrom
refactor/services
Open

refactor(lib): use async/await#9
maximilianoforlenza wants to merge 1 commit into
masterfrom
refactor/services

Conversation

@maximilianoforlenza
Copy link
Copy Markdown
Member

refactor(lib): use async/await

Comment thread lib/services/user.js
Comment thread lib/services/user.js Outdated
@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
Comment thread lib/request.js
if (response.statusCode === 401) {
const token = await refreshToken();
_token = token;
return send(options);
Copy link
Copy Markdown
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