fix: update currentplan
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 14m55s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 1m30s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s

This commit is contained in:
Ricardo Carneiro 2025-09-08 22:13:33 -03:00
parent 90a1ee2bfb
commit 25f686eccd

View File

@ -448,8 +448,8 @@ public class StripeWebhookController : ControllerBase
user.CurrentPlan = planType; user.CurrentPlan = planType;
user.UpdatedAt = DateTime.UtcNow; user.UpdatedAt = DateTime.UtcNow;
var usersCollection = mongoDatabase.GetCollection<Models.User>("users"); var usersCollection2 = mongoDatabase.GetCollection<Models.User>("users");
await usersCollection.ReplaceOneAsync(u => u.Id == user.Id, user); await usersCollection2.ReplaceOneAsync(u => u.Id == user.Id, user);
_logger.LogInformation($"[TID: {traceId}] - User {user.Id} CurrentPlan updated to '{planType}'"); _logger.LogInformation($"[TID: {traceId}] - User {user.Id} CurrentPlan updated to '{planType}'");
// Activate user pages that were pending payment or expired // Activate user pages that were pending payment or expired