Skip to content

Commit

Permalink
Updates to Buffer.from instead of new Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
erkattak committed May 3, 2018
1 parent 7af23e1 commit aace2ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Client {
}

getBasicAuthorization(clientId, clientSecret) {
const clientAuth = new Buffer(`${clientId}:${clientSecret}`);
const clientAuth = Buffer.from(`${clientId}:${clientSecret}`);
return `Basic ${clientAuth.toString('base64')}`;
}

Expand Down
2 changes: 1 addition & 1 deletion test/create-playlist-handler-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getChannel = () => {
}
});
};
const basicAuth = new Buffer(`${clientId}:${clientSecret}`);
const basicAuth = Buffer.from(`${clientId}:${clientSecret}`);
const oauthAuthHeader = `Basic ${basicAuth.toString('base64')}`;
const cmsAuthHeader = `Bearer ${accessTokenResponse.access_token}`;

Expand Down
2 changes: 1 addition & 1 deletion test/create-video-handler-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const getChannel = () => {
}
});
};
const basicAuth = new Buffer(`${clientId}:${clientSecret}`);
const basicAuth = Buffer.from(`${clientId}:${clientSecret}`);
const oauthAuthHeader = `Basic ${basicAuth.toString('base64')}`;
const cmsAuthHeader = `Bearer ${accessTokenResponse.access_token}`;

Expand Down

0 comments on commit aace2ef

Please sign in to comment.