Update footer

This commit is contained in:
Jonathan Cremin 2018-04-11 00:18:43 +01:00
parent 9e4626daa4
commit e12152f7a8
3 changed files with 5 additions and 6 deletions

View file

@ -38,9 +38,8 @@ function looseMatch(needle, haystack, type) {
}
export function* lookupId(id, type) {
console.log(id);
const token = yield spotify.clientCredentialsGrant();
spotify.setAccessToken(token.body['access_token']);
spotify.setAccessToken(token.body.access_token);
let data = yield spotify[`get${type.charAt(0).toUpperCase()}${type.slice(1)}s`]([id]);
data = data.body[`${type}s`][0];
@ -88,7 +87,7 @@ export function* lookupId(id, type) {
export function* search(data, original = {}) {
const token = yield spotify.clientCredentialsGrant();
spotify.setAccessToken(token.body['access_token']);
spotify.setAccessToken(token.body.access_token);
const markets = ['US', 'GB', 'JP', 'BR', 'DE', 'ES'];
function cleanParam(str) {