mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
Add update/delete playlist forms
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user