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 <thomas.schauer-koeckeis@rohde-schwarz.com>
  • Loading branch information
Gepardgame authored and nscuro committed Nov 29, 2024
1 parent 93aca9c commit df9f640
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 df9f640

Please sign in to comment.