Skip to content

refactor(lib): use async/await#9

Open
maximilianoforlenza wants to merge 1 commit intomasterfrom
refactor/services
Open

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

Conversation

@maximilianoforlenza
Copy link
Member

refactor(lib): use async/await

@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