Add debug logs for API calls.
This commit is contained in:
parent
9f0f5a46b7
commit
2a4f6f2c48
|
@ -1,3 +1,4 @@
|
|||
import {debug} from './debug.js';
|
||||
import RelationLink from './relation-link.js';
|
||||
|
||||
type ApiReleaseData = {
|
||||
|
@ -43,6 +44,7 @@ export default class Release {
|
|||
}
|
||||
|
||||
const data = (await apiResponse.json()) as ApiReleaseData;
|
||||
debug(data);
|
||||
|
||||
const artist = data['artist-credit']
|
||||
.map(({name, joinphrase}) => `${name}${joinphrase}`)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import {debug} from './debug.js';
|
||||
|
||||
type ApiSearchData = {
|
||||
releases: Array<{
|
||||
'artist-credit': Array<{
|
||||
|
@ -41,6 +43,8 @@ export default async function searchReleases(
|
|||
}
|
||||
|
||||
const data = (await response.json()) as ApiSearchData;
|
||||
debug(data);
|
||||
|
||||
const results: SearchResult[] = [];
|
||||
|
||||
for (const release of data.releases) {
|
||||
|
|
Loading…
Reference in New Issue