move add/rm/edit event in eventController

This commit is contained in:
les
2020-01-31 14:56:31 +01:00
parent fa0c2fe468
commit c8f2c4b552
7 changed files with 185 additions and 165 deletions

View File

@@ -175,13 +175,13 @@ export const actions = {
commit('update', { tags, places })
},
async addEvent ({ commit }, formData) {
const event = await this.$axios.$post('/user/event', formData)
const event = await this.$axios.$post('/event', formData)
if (event.user) {
commit('addEvent', event)
}
},
async updateEvent ({ commit }, formData) {
const event = await this.$axios.$put('/user/event', formData)
const event = await this.$axios.$put('/event', formData)
if (event.user) {
commit('updateEvent', event)
}