add comments to some store functions

- some refactors to modals
This commit is contained in:
geoffrey45
2022-05-13 20:50:58 +03:00
parent 2e274dac1d
commit 8b62fe78fa
12 changed files with 106 additions and 81 deletions
+6 -2
View File
@@ -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) {