🐛 Fix cannot clear notifications
This commit is contained in:
parent
e56c48362d
commit
3cab122b76
@ -80,7 +80,7 @@ func markNotificationReadBatch(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := database.C.Model(&models.Notification{}).
|
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 {
|
Delete(&models.Notification{}).Error; err != nil {
|
||||||
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user