change route after board duplication

Signed-off-by: Jakob <jakob.roehrl@web.de>
This commit is contained in:
Jakob
2019-10-09 08:42:28 +02:00
parent 31ae00708d
commit 71e7c98fd6
5 changed files with 25 additions and 15 deletions

View File

@@ -281,10 +281,16 @@ export default new Vuex.Store({
})
},
cloneBoard({ commit }, boardData) {
apiClient.cloneBoard(boardData)
.then((board) => {
commit('cloneBoard', board)
})
return new Promise((resolve, reject) => {
apiClient.cloneBoard(boardData)
.then((board) => {
commit('cloneBoard', board)
resolve(board)
})
.catch((err) => {
return reject(err)
})
})
},
removeBoard({ commit }, board) {
commit('removeBoard', board)