mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Add update/delete playlist forms
This commit is contained in:
parent
5dd65b18b7
commit
52163534db
5 changed files with 182 additions and 4 deletions
|
|
@ -213,6 +213,10 @@ const updatePlaylist = async (args: UpdatePlaylistArgs) => {
|
|||
return (apiController('updatePlaylist') as ControllerEndpoint['updatePlaylist'])?.(args);
|
||||
};
|
||||
|
||||
const deletePlaylist = async (args: DeletePlaylistArgs) => {
|
||||
return (apiController('deletePlaylist') as ControllerEndpoint['deletePlaylist'])?.(args);
|
||||
};
|
||||
|
||||
const getPlaylistDetail = async (args: PlaylistDetailArgs) => {
|
||||
return (apiController('getPlaylistDetail') as ControllerEndpoint['getPlaylistDetail'])?.(args);
|
||||
};
|
||||
|
|
@ -225,6 +229,7 @@ const getPlaylistSongList = async (args: PlaylistSongListArgs) => {
|
|||
|
||||
export const controller = {
|
||||
createPlaylist,
|
||||
deletePlaylist,
|
||||
getAlbumArtistList,
|
||||
getAlbumDetail,
|
||||
getAlbumList,
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ const updatePlaylist = async (args: UpdatePlaylistArgs): Promise<UpdatePlaylistR
|
|||
};
|
||||
|
||||
const data = await api
|
||||
.post(`api/playlist/${query.id}`, {
|
||||
.put(`api/playlist/${query.id}`, {
|
||||
headers: { 'x-nd-authorization': `Bearer ${server?.ndCredential}` },
|
||||
json,
|
||||
prefixUrl: server?.url,
|
||||
|
|
@ -591,6 +591,7 @@ const normalizePlaylist = (
|
|||
});
|
||||
|
||||
return {
|
||||
description: item.comment,
|
||||
duration: item.duration * 1000,
|
||||
id: item.id,
|
||||
imagePlaceholderUrl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue