feat: add validators to check values in services
Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
f250d9956b
commit
9d09916c17
@@ -70,9 +70,9 @@ export default {
|
||||
startCreateBoard(e) {
|
||||
this.editing = true
|
||||
},
|
||||
createBoard(e) {
|
||||
async createBoard(e) {
|
||||
const title = e.currentTarget.childNodes[0].value
|
||||
this.$store.dispatch('createBoard', {
|
||||
await this.$store.dispatch('createBoard', {
|
||||
title,
|
||||
color: this.color.substring(1),
|
||||
})
|
||||
|
||||
@@ -384,11 +384,13 @@ export default new Vuex.Store({
|
||||
const storedBoard = await apiClient.updateBoard(board)
|
||||
commit('addBoard', storedBoard)
|
||||
},
|
||||
createBoard({ commit }, boardData) {
|
||||
apiClient.createBoard(boardData)
|
||||
.then((board) => {
|
||||
commit('addBoard', board)
|
||||
})
|
||||
async createBoard({ commit }, boardData) {
|
||||
try {
|
||||
const board = await apiClient.createBoard(boardData)
|
||||
commit('addBoard', board)
|
||||
} catch (err) {
|
||||
return err
|
||||
}
|
||||
},
|
||||
async cloneBoard({ commit }, boardData) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user