Refactor subscription renewal process to utilize panel webhook
- Removed the recurring billing task from the bot, shifting the auto-renew functionality to the panel webhook service, which now triggers renewals 24 hours before expiry. - Updated service dependencies to wire the subscription service with the panel webhook for seamless renewal handling. - Adjusted the Subscription model to enable auto-renew by default, enhancing subscription management.
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ class Subscription(Base):
|
||||
last_notification_sent = Column(DateTime(timezone=True), nullable=True)
|
||||
provider = Column(String, nullable=True)
|
||||
skip_notifications = Column(Boolean, default=False)
|
||||
auto_renew_enabled = Column(Boolean, default=False, index=True)
|
||||
auto_renew_enabled = Column(Boolean, default=True, index=True)
|
||||
|
||||
user = relationship("User", back_populates="subscriptions")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user