saveGuaranteed in almost all cases except updateProfile
This commit is contained in:
@@ -232,7 +232,7 @@ export class AccountComponent {
|
||||
this.profileUrl = `${this.env.imageBaseUrl}/pictures/profile/${emailToDirName(this.user.email)}.avif?_ts=${new Date().getTime()}`;
|
||||
this.sharedService.changeProfilePhoto(this.profileUrl);
|
||||
}
|
||||
await this.userService.save(this.user);
|
||||
await this.userService.saveGuaranteed(this.user);
|
||||
}
|
||||
}
|
||||
async deleteConfirm(type: 'profile' | 'logo') {
|
||||
@@ -240,10 +240,10 @@ export class AccountComponent {
|
||||
if (confirmed) {
|
||||
if (type === 'profile') {
|
||||
this.user.hasProfile = false;
|
||||
await Promise.all([this.imageService.deleteProfileImagesByMail(this.user.email), this.userService.save(this.user)]);
|
||||
await Promise.all([this.imageService.deleteProfileImagesByMail(this.user.email), this.userService.saveGuaranteed(this.user)]);
|
||||
} else {
|
||||
this.user.hasCompanyLogo = false;
|
||||
await Promise.all([this.imageService.deleteLogoImagesByMail(this.user.email), this.userService.save(this.user)]);
|
||||
await Promise.all([this.imageService.deleteLogoImagesByMail(this.user.email), this.userService.saveGuaranteed(this.user)]);
|
||||
}
|
||||
this.user = await this.userService.getById(this.user.id);
|
||||
// this.messageService.showMessage('Image deleted');
|
||||
|
||||
Reference in New Issue
Block a user