Skip to content

Commit

Permalink
minors
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Dec 6, 2024
1 parent e604ddb commit a52f27b
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
const patchData = {
"privacy": {}
};
if (this.__userProfileData["privacy"]["hideFullname"] !== model.getHideFullname()) {
if (this.__userPrivacyData["hideFullname"] !== model.getHideFullname()) {
patchData["privacy"]["hideFullname"] = model.getHideFullname();
}
if (this.__userProfileData["privacy"]["hideEmail"] !== model.getHideEmail()) {
if (this.__userPrivacyData["hideEmail"] !== model.getHideEmail()) {
patchData["privacy"]["hideEmail"] = model.getHideEmail();
}

Expand All @@ -277,14 +277,13 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
};
osparc.data.Resources.fetch("profile", "patch", params)
.then(() => {
this.__setDataToPrivacy(Object.assign(this.__userProfileData, params.data));
// osparc.auth.Manager.getInstance().updateProfile(this.__userProfileData);
const msg = this.tr("Profile updated");
this.__setDataToPrivacy(Object.assign(this.__userPrivacyData, params.data));
const msg = this.tr("Privacy updated");
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
})
.catch(err => {
this.__resetPrivacyData();
const msg = err.message || this.tr("Failed to update profile");
const msg = err.message || this.tr("Failed to update privacy");
osparc.FlashMessenger.getInstance().logAs(msg, "ERROR");
console.error(err);
});
Expand Down

0 comments on commit a52f27b

Please sign in to comment.