saveGuaranteed in almost all cases except updateProfile
This commit is contained in:
@@ -32,7 +32,7 @@ export class PricingComponent {
|
||||
if (this.id === 'free') {
|
||||
this.user = await this.userService.getByMail(this.keycloakUser.email);
|
||||
this.user.subscriptionPlan = 'free';
|
||||
await this.userService.save(this.user);
|
||||
await this.userService.saveGuaranteed(this.user);
|
||||
this.router.navigate([`/account`]);
|
||||
} else if (this.id) {
|
||||
this.checkout({ priceId: atob(this.id), email: this.keycloakUser.email, name: `${this.keycloakUser.firstName} ${this.keycloakUser.lastName}` });
|
||||
@@ -50,7 +50,7 @@ export class PricingComponent {
|
||||
if (!priceId) {
|
||||
this.user = await this.userService.getByMail(this.keycloakUser.email);
|
||||
this.user.subscriptionPlan = 'free';
|
||||
await this.userService.save(this.user);
|
||||
await this.userService.saveGuaranteed(this.user);
|
||||
this.router.navigate([`/account`]);
|
||||
} else {
|
||||
this.checkout({ priceId: priceId, email: this.keycloakUser.email, name: `${this.keycloakUser.firstName} ${this.keycloakUser.lastName}` });
|
||||
|
||||
Reference in New Issue
Block a user