Skip to content

Commit 958bc3d

Browse files
authored
Merge pull request #1099 from nscuro/backport-pr-1091
2 parents 93aca9c + df9f640 commit 958bc3d

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

src/views/administration/configuration/WelcomeMessage.vue

+11-17
Original file line numberDiff line numberDiff line change
@@ -91,26 +91,20 @@ export default {
9191
editor.style.height = editor.scrollHeight + 'px';
9292
},
9393
saveChanges() {
94-
let url = `${this.$api.BASE_URL}/${this.$api.URL_CONFIG_PROPERTY}`;
95-
axios.post(url, {
96-
groupName: 'general',
97-
propertyName: 'welcome.message.html',
98-
propertyValue: encodeURIComponent(
99-
this.welcomeMessage !== '' ? this.welcomeMessage : ' ',
100-
),
101-
});
102-
axios
103-
.post(url, {
94+
this.updateConfigProperties([
95+
{
96+
groupName: 'general',
97+
propertyName: 'welcome.message.html',
98+
propertyValue: encodeURIComponent(
99+
this.welcomeMessage !== '' ? this.welcomeMessage : ' ',
100+
),
101+
},
102+
{
104103
groupName: 'general',
105104
propertyName: 'welcome.message.enabled',
106105
propertyValue: this.isWelcomeMessage,
107-
})
108-
.then((response) => {
109-
this.$toastr.s(this.$t('admin.configuration_saved'));
110-
})
111-
.catch((error) => {
112-
this.$toastr.w(this.$t('condition.unsuccessful_action'));
113-
});
106+
},
107+
]);
114108
},
115109
},
116110
};

0 commit comments

Comments
 (0)