feat: separate expiry notification days and refactor TG bot interactive logic

This commit is contained in:
Bot
2026-05-13 00:52:36 +08:00
parent 3d00f09493
commit f3dded3186
8 changed files with 484 additions and 238 deletions
+6
View File
@@ -113,6 +113,12 @@ func updateConfig(c *gin.Context) (any, error) {
singleton.Conf.CustomLinks = sf.CustomLinks
singleton.Conf.TelegramBotToken = sf.TelegramBotToken
singleton.Conf.TelegramAdminChatID = sf.TelegramAdminChatID
singleton.Conf.SMTPServer = sf.SMTPServer
singleton.Conf.SMTPUser = sf.SMTPUser
singleton.Conf.SMTPPassword = sf.SMTPPassword
singleton.Conf.AdminEmail = sf.AdminEmail
singleton.Conf.DomainExpiryNotificationDays = sf.DomainExpiryNotificationDays
singleton.Conf.ServerExpiryNotificationDays = sf.ServerExpiryNotificationDays
if err := singleton.Conf.Save(); err != nil {
return nil, newGormError("%v", err)