🐛 Fix cannot add notification subscription

This commit is contained in:
LittleSheep 2025-02-21 22:39:55 +08:00
parent 6db14a71af
commit 816ee07947

View File

@ -25,7 +25,7 @@ func AddNotifySubscriber(user models.Account, provider, id, tk, ua string) (mode
if err := database.C.Where(&models.NotificationSubscriber{ if err := database.C.Where(&models.NotificationSubscriber{
DeviceID: id, DeviceID: id,
AccountID: user.ID, AccountID: user.ID,
}); err != nil { }).First(&prev).Error; err != nil {
subscriber = models.NotificationSubscriber{ subscriber = models.NotificationSubscriber{
UserAgent: ua, UserAgent: ua,
Provider: provider, Provider: provider,