feat(FE): playlist, get content
This commit is contained in:
parent
25e4c44b81
commit
bcde31e673
1 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue