Merge branch 'hotfix/v2.6.1' of https://github.com/ONLYOFFICE/DocSpace-client into hotfix/v2.6.1

This commit is contained in:
Nikita Gopienko 2024-08-09 17:55:01 +03:00
commit 8115c7ba33
2 changed files with 9 additions and 13 deletions

View File

@ -187,12 +187,14 @@ const AdditionalResources = (props) => {
const onSave = useCallback(async () => {
setIsLoading(true);
const settings = JSON.parse(JSON.stringify(additionalResourcesData));
settings.feedbackAndSupportEnabled = feedbackAndSupportEnabled;
settings.videoGuidesEnabled = videoGuidesEnabled;
settings.helpCenterEnabled = helpCenterEnabled;
await api.settings
.setAdditionalResources(
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled,
)
.setAdditionalResources(settings)
.then(() => {
toastr.success(t("Settings:SuccessfullySaveSettingsMessage"));
})

View File

@ -407,16 +407,10 @@ export async function getCustomSchemaList() {
}
export function setAdditionalResources(
feedbackAndSupportEnabled,
videoGuidesEnabled,
helpCenterEnabled,
additionalResources: TAdditionalResources,
) {
const data = {
settings: {
helpCenterEnabled,
feedbackAndSupportEnabled,
videoGuidesEnabled,
},
settings: additionalResources,
};
return request({