feat(FE): playlist, get content

This commit is contained in:
Michael 2025-03-31 20:01:11 +02:00
parent 25e4c44b81
commit bcde31e673

View file

@ -48,7 +48,7 @@ export const getPlaylist = async (options: {
page?: Number | null;
per_page?: Number | null;
all?: string | null;
}): Promise<Show[]> => {
}): Promise<any> => {
const filteredParams = cleanOptions(options);
return await axios.get(`/playlist`, {params: filteredParams})
.then((response: AxiosResponse) => {
@ -56,4 +56,14 @@ export const getPlaylist = async (options: {
}).catch((error: Error) => {
console.log("Error: " + error);
})
}
// TODO playlist interface
export const getPlaylistContent = async (playlistId: Number): Promise<any> => {
return await axios.get(`/playlist/${playlistId}`)
.then((response: AxiosResponse) => {
return response.data
}).catch((error: Error) => {
console.log("Error: " + error);
})
}