mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
rewrite some fetch methods to use the useAxios hook
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
getAlbumTracks,
|
||||
getAlbumArtists,
|
||||
getAlbumBio,
|
||||
} from "../../composables/album";
|
||||
} from "../../composables/fetch/album";
|
||||
|
||||
export default defineStore("album", {
|
||||
state: () => ({
|
||||
@@ -21,6 +21,7 @@ export default defineStore("album", {
|
||||
* @param albumartist artist of the album
|
||||
*/
|
||||
async fetchTracksAndArtists(title: string, albumartist: string) {
|
||||
|
||||
const tracks = await getAlbumTracks(title, albumartist);
|
||||
const artists = await getAlbumArtists(title, albumartist);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { getPlaylist } from "../../composables/playlists";
|
||||
import { getPlaylist } from "../../composables/fetch/playlists";
|
||||
import { Track, Playlist } from "../../interfaces";
|
||||
|
||||
export default defineStore("playlist-tracks", {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { Playlist } from "../../interfaces";
|
||||
import { getAllPlaylists } from "../../composables/playlists";
|
||||
import { getAllPlaylists } from "../../composables/fetch/playlists";
|
||||
|
||||
export default defineStore("playlists", {
|
||||
state: () => ({
|
||||
|
||||
Reference in New Issue
Block a user