fixing bugs
This commit is contained in:
@@ -24,7 +24,6 @@ export default {
|
|||||||
const res = await fetch("/api/spotify/listening");
|
const res = await fetch("/api/spotify/listening");
|
||||||
if (!res.ok) throw new Error("Failed to fetch Spotify data");
|
if (!res.ok) throw new Error("Failed to fetch Spotify data");
|
||||||
song.value = await res.json();
|
song.value = await res.json();
|
||||||
console.log(data);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-for="(song, idx) in played"
|
v-for="(song, idx) in played"
|
||||||
:key="song.item.id || idx"
|
:key="song.track.id || idx"
|
||||||
class="spotify-now-playing"
|
class="spotify-now-playing"
|
||||||
>
|
>
|
||||||
<img :src="song.item.album.images[0].url" />
|
<img :src="song.track.album.images[0].url" />
|
||||||
<p><strong>Song:</strong> {{ song.item.name }}</p>
|
<p><strong>Song:</strong> {{ song.track.name }}</p>
|
||||||
<p><strong>Artist:</strong> {{ song.item.artists[0].name }}</p>
|
<p><strong>Artist:</strong> {{ song.track.artists[0].name }}</p>
|
||||||
<p>Is what im currently listening to rnrnrn ^_^</p>
|
<p>Is what im currently listening to rnrnrn ^_^</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user