You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel like the updateUserStripePaymentDetails method is doing too much, it's used for:
updating subscriptionPlan
updating datePaid
incrementing the credits
updating subscriptionStatus
I'd recommend that we refactor it into multiple smaller methods that could be very specific about what they are updating:
updateSubscriptionPlan
updateCreditsAmount
updateDatePaid
etc.
There are way to make this composable, so we only have one DB insert, we compose the data object for multiple updates and then execute the insert:
From @infomiho:
The text was updated successfully, but these errors were encountered: