diff --git a/src/library/album/AlbumDetails.vue b/src/library/album/AlbumDetails.vue index 1b96a06..3efc6b8 100644 --- a/src/library/album/AlbumDetails.vue +++ b/src/library/album/AlbumDetails.vue @@ -69,7 +69,7 @@ album: null as null | Album, } }, - async mounted() { + async created() { this.album = await this.$api.getAlbumDetails(this.id) }, methods: { diff --git a/src/library/artist/ArtistLibrary.vue b/src/library/artist/ArtistLibrary.vue index 9e2126b..cc466d9 100644 --- a/src/library/artist/ArtistLibrary.vue +++ b/src/library/artist/ArtistLibrary.vue @@ -17,10 +17,8 @@ items: null as null | Artist[] } }, - created() { - this.$api.getArtists().then(items => { - this.items = items - }) + async created() { + this.items = await this.$api.getArtists() } }) diff --git a/src/library/genre/GenreLibrary.vue b/src/library/genre/GenreLibrary.vue index 8e39326..7e2f518 100644 --- a/src/library/genre/GenreLibrary.vue +++ b/src/library/genre/GenreLibrary.vue @@ -20,10 +20,8 @@ items: [], } }, - created() { - this.$api.getGenres().then((items) => { - this.items = items - }) + async created() { + this.items = await this.$api.getGenres() }, }) diff --git a/src/library/starred/Starred.vue b/src/library/starred/Starred.vue index ef47cba..091819c 100644 --- a/src/library/starred/Starred.vue +++ b/src/library/starred/Starred.vue @@ -31,10 +31,8 @@ result: null as any, } }, - created() { - this.$api.getStarred().then(result => { - this.result = result - }) + async created() { + this.result = await this.$api.getStarred() } })