mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
fix: notifier groups cache not initialized (#995)
This commit is contained in:
@@ -54,6 +54,12 @@ func loadNotifications() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var groups []model.NotificationGroup
|
||||
DB.Find(&groups)
|
||||
for _, grp := range groups {
|
||||
NotificationGroup[grp.ID] = grp.Name
|
||||
}
|
||||
|
||||
NotificationMap = make(map[uint64]*model.Notification, len(NotificationListSorted))
|
||||
for i := range NotificationListSorted {
|
||||
NotificationMap[NotificationListSorted[i].ID] = NotificationListSorted[i]
|
||||
|
||||
Reference in New Issue
Block a user