mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 13:08:01 +02:00
Merge branch 'main' into patch-accessibility-bgcolor
This commit is contained in:
commit
8bd6703e9e
3 changed files with 19 additions and 7 deletions
|
@ -48,20 +48,24 @@ const openSong = el => {
|
|||
emit('open-song', props.play);
|
||||
},
|
||||
Remove = () => {
|
||||
// WIP
|
||||
|
||||
const auth = useStore().getItem('auth');
|
||||
|
||||
if (auth) {
|
||||
if (auth && confirm('Are you sure?')) {
|
||||
getJsonAuth('/user/playlists/remove', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: auth,
|
||||
},
|
||||
body: {
|
||||
index,
|
||||
body: JSON.stringify({
|
||||
index: props.index,
|
||||
playlistId,
|
||||
},
|
||||
}),
|
||||
}).then(json => {
|
||||
console.log(json);
|
||||
|
||||
if (!json.error) {
|
||||
if (json.message == 'ok') emit('remove', props.index);
|
||||
} else alert(json.error);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue