From 2482de80a9d316321c4cbb513890a0f30cbcbc15 Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 21 Oct 2021 12:17:22 +0200 Subject: [PATCH] fix issue with SMTP vars mutation --- components/admin/SMTP.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/admin/SMTP.vue b/components/admin/SMTP.vue index 9f00774b..ac330d52 100644 --- a/components/admin/SMTP.vue +++ b/components/admin/SMTP.vue @@ -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 }) }, }