fix issue with SMTP vars mutation

This commit is contained in:
lesion 2021-10-21 12:17:22 +02:00
parent 0ccf912a39
commit 2482de80a9
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -52,6 +52,7 @@ export default {
async testSMTP () {
this.loading = true
try {
this.setSetting({ key: 'smtp', value: this.smtp })
await this.$axios.$post('/settings/smtp', { smtp: this.smtp })
this.$root.$message(this.$t('admin.smtp_test_success', { admin_email: this.admin_email }), { color: 'success' })
} catch (e) {
@ -66,8 +67,8 @@ export default {
}
},
done () {
this.setSetting({ key: 'smtp', value: JSON.parse(JSON.stringify(this.smtp)) })
this.$emit('close')
this.setSetting({ key: 'smtp', value: this.smtp })
},
}