mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 08:05:03 +00:00
add comments to some store functions
- some refactors to modals
This commit is contained in:
1 parent
2e274dac1d
commit
8b62fe78fa
12 files changed
+106
-81
No files matched your search
@@ -7,7 +7,10 @@ import state from "./state";
|
||||
* @param playlist_name The name of the playlist to create.
|
||||
*/
|
||||
async function createNewPlaylist(playlist_name: string, track?: Track) {
|
||||
let status = false;
|
||||
let status = {
|
||||
success: false,
|
||||
playlist: <Playlist>{},
|
||||
};
|
||||
|
||||
await axios
|
||||
.post(state.settings.uri + "/playlist/new", {
|
||||
@@ -22,7 +25,8 @@ async function createNewPlaylist(playlist_name: string, track?: Track) {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
status = true;
|
||||
status.success = true;
|
||||
status.playlist = res.data.playlist;
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err.response.status == 409) {
|
||||
|
||||
Reference in new issue
Block a user