From 641d52dae7af36ef447dc7bf85fbad656400da12 Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Thu, 19 Oct 2023 16:42:36 +0200 Subject: [PATCH] fix(settings): remove unused savePrimaryEmailScope on Personal Settings page If was replaced with universal `savePrimaryAccountPropertyScope`. `` has no `handle-scope-change` prop. Signed-off-by: Grigorii K. Shartsev --- .../EmailSection/EmailSection.vue | 4 +--- .../src/service/PersonalInfo/EmailService.js | 20 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue index c977ef54e96..0cc94b4998a 100644 --- a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue +++ b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue @@ -24,7 +24,6 @@
({ ...properties, key: this.generateUniqueKey() })), displayNameChangeSupported, primaryEmail: { ...primaryEmail, readable: NAME_READABLE_ENUM[primaryEmail.name] }, - savePrimaryEmailScope, notificationEmail, } }, diff --git a/apps/settings/src/service/PersonalInfo/EmailService.js b/apps/settings/src/service/PersonalInfo/EmailService.js index 535bd6a2295..f8256f0bdc0 100644 --- a/apps/settings/src/service/PersonalInfo/EmailService.js +++ b/apps/settings/src/service/PersonalInfo/EmailService.js @@ -131,26 +131,6 @@ export const updateAdditionalEmail = async (prevEmail, newEmail) => { return res.data } -/** - * Save the federation scope for the primary email of the user - * - * @param {string} scope the federation scope - * @return {object} - */ -export const savePrimaryEmailScope = async (scope) => { - const userId = getCurrentUser().uid - const url = generateOcsUrl('cloud/users/{userId}', { userId }) - - await confirmPassword() - - const res = await axios.put(url, { - key: `${ACCOUNT_PROPERTY_ENUM.EMAIL}${SCOPE_SUFFIX}`, - value: scope, - }) - - return res.data -} - /** * Save the federation scope for the additional email of the user *