Skip to content

Commit

Permalink
Uses same thing as the other configs to update
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Schauer-Koeckeis <[email protected]>
  • Loading branch information
Gepardgame committed Nov 18, 2024
1 parent 3222606 commit bc4f076
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/views/administration/configuration/WelcomeMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,20 @@ export default {
editor.style.height = editor.scrollHeight + 'px';
},
saveChanges() {
let url = `${this.$api.BASE_URL}/${this.$api.URL_CONFIG_PROPERTY}`;
axios.post(url, {
groupName: 'general',
propertyName: 'welcome.message.html',
propertyValue: encodeURIComponent(
this.welcomeMessage !== '' ? this.welcomeMessage : ' ',
),
});
axios
.post(url, {
this.updateConfigProperties([
{
groupName: 'general',
propertyName: 'welcome.message.html',
propertyValue: encodeURIComponent(
this.welcomeMessage !== '' ? this.welcomeMessage : ' ',
),
},
{
groupName: 'general',
propertyName: 'welcome.message.enabled',
propertyValue: this.isWelcomeMessage,
})
.then((response) => {
this.$toastr.s(this.$t('admin.configuration_saved'));
})
.catch((error) => {
this.$toastr.w(this.$t('condition.unsuccessful_action'));
});
},
]);
},
},
};
Expand Down

0 comments on commit bc4f076

Please sign in to comment.