🐛 Fix whats new didn't use db context

This commit is contained in:
LittleSheep 2024-09-03 23:00:06 +08:00
parent 56def6ea2c
commit 41ebb572fa

View File

@ -49,7 +49,7 @@ func getWhatsNew(c *fiber.Ctx) error {
} }
var items []models.Event var items []models.Event
if err := database.C. if err := tx.
Limit(take). Limit(take).
Order("created_at DESC"). Order("created_at DESC").
Preload("Sender"). Preload("Sender").