@@ -41,7 +41,6 @@ type StripeController struct {
4141 EmailNotificationCtrl * emailCtrl.EmailNotificationController
4242 OfferController * offer.OfferController
4343 CommonBillCtrl * commonbilling.Controller
44- NotificationCtrl * repo.NotificationHistoryRepository
4544}
4645
4746const BufferPeriodOnPaymentFailureInDays = 7
@@ -58,7 +57,6 @@ func NewStripeController(
5857 emailNotificationController * emailCtrl.EmailNotificationController ,
5958 offerController * offer.OfferController ,
6059 commonBillCtrl * commonbilling.Controller ,
61- notificationCtrl * repo.NotificationHistoryRepository ,
6260) * StripeController {
6361 return & StripeController {
6462 StripeClients : stripeClients ,
@@ -71,7 +69,6 @@ func NewStripeController(
7169 EmailNotificationCtrl : emailNotificationController ,
7270 OfferController : offerController ,
7371 CommonBillCtrl : commonBillCtrl ,
74- NotificationCtrl : notificationCtrl ,
7572 }
7673}
7774
@@ -265,12 +262,8 @@ func (c *StripeController) handleCheckoutSessionCompleted(event stripe.Event, co
265262 if err != nil {
266263 return ente.StripeEventLog {UserID : userID , StripeSubscription : stripeSubscription , Event : event }, stacktrace .Propagate (err , "Failed to change subscription" )
267264 }
268-
265+
269266 // Execute DeleteLastNotificationTime entry after successful execution of ReplaceSubscription
270- err = c .NotificationCtrl .DeleteLastNotificationTime (newSubscription .UserID , "90_percent_consumed" )
271- if err != nil {
272- return ente.StripeEventLog {}, stacktrace .Propagate (err , "" )
273- }
274267 return ente.StripeEventLog {UserID : userID , StripeSubscription : stripeSubscription , Event : event }, nil
275268 } else {
276269 priceID , err := c .getPriceIDFromSession (session .ID )
@@ -313,10 +306,7 @@ func (c *StripeController) handleCustomerSubscriptionUpdated(event stripe.Event,
313306 // events to update the state
314307 if currentSubscription .ProductID != newSubscription .ProductID {
315308 c .BillingRepo .ReplaceSubscription (currentSubscription .ID , newSubscription )
316- err := c .NotificationCtrl .DeleteLastNotificationTime (currentSubscription .UserID , "90_percent_consumed" )
317- if err != nil {
318- return ente.StripeEventLog {}, stacktrace .Propagate (err , "" )
319- }
309+
320310 }
321311
322312 fullStripeSub , err := c .getStripeSubscriptionWithPaymentMethod (currentSubscription )
0 commit comments