diff --git a/src/_data/albums.js b/src/_data/albums.js index b5f239f1..af4db256 100644 --- a/src/_data/albums.js +++ b/src/_data/albums.js @@ -9,7 +9,7 @@ module.exports = async function () { type: 'json', }).catch() const data = await res - return data['topalbums'].album.map((album) => { + return data['topalbums']['album'].map((album) => { return { title: album['name'], artist: album['artist']['name'], diff --git a/src/_data/artists.js b/src/_data/artists.js index 0734236e..926d1346 100644 --- a/src/_data/artists.js +++ b/src/_data/artists.js @@ -8,7 +8,7 @@ module.exports = async function () { type: 'json', }).catch() const data = await res - return data['topartists'].artist.map((artist) => { + return data['topartists']['artist'].map((artist) => { return { title: artist['name'], plays: artist['playcount'], diff --git a/src/_data/links.js b/src/_data/links.js index 1a7331f6..34b610c1 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -10,7 +10,7 @@ module.exports = async function () { fetchOptions: { headers }, }) const data = await res - const links = data.results.filter((result) => Object.keys(result.tags).includes('share')) + const links = data['results'].filter((result) => Object.keys(result.tags).includes('share')) return links.map((link) => { return { title: link['title'], diff --git a/src/_data/webmentions.js b/src/_data/webmentions.js index 274296f7..e1849da7 100644 --- a/src/_data/webmentions.js +++ b/src/_data/webmentions.js @@ -9,6 +9,6 @@ module.exports = async function () { }).catch() const webmentions = await res return { - mentions: webmentions.children, + mentions: webmentions['children'], } }