|
@@ -17,12 +17,16 @@ const modules = {
|
|
},
|
|
},
|
|
getters: {},
|
|
getters: {},
|
|
actions: {
|
|
actions: {
|
|
|
|
+ resetSongs: ({ commit }) => commit("resetSongs"),
|
|
addSong: ({ commit }, song) => commit("addSong", song),
|
|
addSong: ({ commit }, song) => commit("addSong", song),
|
|
removeSong: ({ commit }, songId) => commit("removeSong", songId),
|
|
removeSong: ({ commit }, songId) => commit("removeSong", songId),
|
|
updateSong: ({ commit }, updatedSong) =>
|
|
updateSong: ({ commit }, updatedSong) =>
|
|
commit("updateSong", updatedSong)
|
|
commit("updateSong", updatedSong)
|
|
},
|
|
},
|
|
mutations: {
|
|
mutations: {
|
|
|
|
+ resetSongs(state) {
|
|
|
|
+ state.songs = [];
|
|
|
|
+ },
|
|
addSong(state, song) {
|
|
addSong(state, song) {
|
|
state.songs.push(song);
|
|
state.songs.push(song);
|
|
},
|
|
},
|
|
@@ -46,12 +50,16 @@ const modules = {
|
|
},
|
|
},
|
|
getters: {},
|
|
getters: {},
|
|
actions: {
|
|
actions: {
|
|
|
|
+ resetSongs: ({ commit }) => commit("resetSongs"),
|
|
addSong: ({ commit }, song) => commit("addSong", song),
|
|
addSong: ({ commit }, song) => commit("addSong", song),
|
|
removeSong: ({ commit }, songId) => commit("removeSong", songId),
|
|
removeSong: ({ commit }, songId) => commit("removeSong", songId),
|
|
updateSong: ({ commit }, updatedSong) =>
|
|
updateSong: ({ commit }, updatedSong) =>
|
|
commit("updateSong", updatedSong)
|
|
commit("updateSong", updatedSong)
|
|
},
|
|
},
|
|
mutations: {
|
|
mutations: {
|
|
|
|
+ resetSongs(state) {
|
|
|
|
+ state.songs = [];
|
|
|
|
+ },
|
|
addSong(state, song) {
|
|
addSong(state, song) {
|
|
state.songs.push(song);
|
|
state.songs.push(song);
|
|
},
|
|
},
|
|
@@ -75,12 +83,16 @@ const modules = {
|
|
},
|
|
},
|
|
getters: {},
|
|
getters: {},
|
|
actions: {
|
|
actions: {
|
|
|
|
+ resetSongs: ({ commit }) => commit("resetSongs"),
|
|
addSong: ({ commit }, song) => commit("addSong", song),
|
|
addSong: ({ commit }, song) => commit("addSong", song),
|
|
removeSong: ({ commit }, songId) => commit("removeSong", songId),
|
|
removeSong: ({ commit }, songId) => commit("removeSong", songId),
|
|
updateSong: ({ commit }, updatedSong) =>
|
|
updateSong: ({ commit }, updatedSong) =>
|
|
commit("updateSong", updatedSong)
|
|
commit("updateSong", updatedSong)
|
|
},
|
|
},
|
|
mutations: {
|
|
mutations: {
|
|
|
|
+ resetSongs(state) {
|
|
|
|
+ state.songs = [];
|
|
|
|
+ },
|
|
addSong(state, song) {
|
|
addSong(state, song) {
|
|
state.songs.push(song);
|
|
state.songs.push(song);
|
|
},
|
|
},
|