From 41ebb572fa50aa1d7844173d1a916758931c33d1 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 3 Sep 2024 23:00:06 +0800 Subject: [PATCH] :bug: Fix whats new didn't use db context --- pkg/internal/server/api/whats_new_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/server/api/whats_new_api.go b/pkg/internal/server/api/whats_new_api.go index 849f885..509e5e0 100644 --- a/pkg/internal/server/api/whats_new_api.go +++ b/pkg/internal/server/api/whats_new_api.go @@ -49,7 +49,7 @@ func getWhatsNew(c *fiber.Ctx) error { } var items []models.Event - if err := database.C. + if err := tx. Limit(take). Order("created_at DESC"). Preload("Sender").