🐛 Fix cannot clear notifications

This commit is contained in:
LittleSheep 2024-07-23 22:04:52 +08:00
parent e56c48362d
commit 3cab122b76

View File

@ -80,7 +80,7 @@ func markNotificationReadBatch(c *fiber.Ctx) error {
}
if err := database.C.Model(&models.Notification{}).
Where("recipient_id = ? AND id IN ?", user.ID, data.MessageIDs).
Where("account_id = ? AND id IN ?", user.ID, data.MessageIDs).
Delete(&models.Notification{}).Error; err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
} else {