minor with 2w recurrent event frequency

This commit is contained in:
lesion
2023-03-20 12:40:19 +01:00
parent 8f221fb69c
commit b8e096ee39
3 changed files with 8 additions and 11 deletions

View File

@@ -250,13 +250,11 @@ export default {
}
if (this.event.tags) { this.event.tags.forEach(tag => formData.append('tags[]', tag.tag || tag)) }
try {
if (this.edit) {
const ret = await this.$axios.$put('/event', formData)
const ret = this.edit ? await this.$axios.$put('/event', formData) : await this.$axios.$post('/event', formData)
if (!this.date.recurrent) {
this.$router.push(`/event/${ret.slug}`)
} else {
const ret = await this.$axios.$post('/event', formData)
this.$router.push(`/event/${ret.slug}`)
this.$router.push('/')
}
this.$nextTick(() => {
this.$root.$message(this.$auth.loggedIn ? (this.edit ? 'event.saved' : 'event.added') : 'event.added_anon', { color: 'success' })