go to event page only in case is visible

This commit is contained in:
lesion 2023-04-14 11:42:20 +02:00
parent 4e3a36ec0d
commit 9f639c1c33
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -260,7 +260,7 @@ export default {
if (this.event.tags) { this.event.tags.forEach(tag => formData.append('tags[]', tag.tag || tag)) }
try {
const ret = this.edit ? await this.$axios.$put('/event', formData) : await this.$axios.$post('/event', formData)
if (!this.date.recurrent) {
if (!this.date.recurrent && ret.is_visible) {
this.$router.push(`/event/${ret.slug}`)
} else {
this.$router.push('/')