fixing bugs

This commit is contained in:
2025-11-29 01:03:48 +00:00
parent 5547f30fc9
commit 33e1ac1c19
2 changed files with 4 additions and 5 deletions

View File

@@ -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);
} }

View File

@@ -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>