Fix tests
This commit is contained in:
parent
b0b2c452bd
commit
ca1fbf9e66
4 changed files with 7 additions and 7 deletions
|
@ -35,14 +35,14 @@ export function* lookupId(possibleId, type, countrycode) {
|
|||
cc = possibleId.substr(0, 2);
|
||||
id = possibleId.substr(2);
|
||||
}
|
||||
console.log(id)
|
||||
|
||||
let path = `/lookup?id=${id}`;
|
||||
if (cc) {
|
||||
path = `/${cc}${path}`;
|
||||
}
|
||||
const response = yield request.get(apiRoot + path);
|
||||
let result = JSON.parse(response.text);
|
||||
console.log(result);
|
||||
|
||||
if (!result.results || result.resultCount === 0 || !result.results[0].collectionId) {
|
||||
const error = new Error('Not Found');
|
||||
error.status = 404;
|
||||
|
@ -121,7 +121,7 @@ export function* search(data) {
|
|||
purchaseUrl: result.collectionViewUrl,
|
||||
artwork: {
|
||||
small: `${result.artworkUrl100.replace('100x100', '200x200').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
large: `${result.artworkUrl100.replace('100x100', '600x600').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
large: `${result.artworkUrl100.replace('100x100', '600x600').replace('.mzstatic.com', '-ssl.mzstatic.com').replace('http://', 'https://')}`,
|
||||
},
|
||||
artist: {
|
||||
name: result.artistName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue