From 56def6ea2c775315ea66f2e6f5bb6aebac0a7ff8 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 3 Sep 2024 22:54:11 +0800 Subject: [PATCH] :bug: Fix whats new missing preloading --- 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 3bc0a25..849f885 100644 --- a/pkg/internal/server/api/whats_new_api.go +++ b/pkg/internal/server/api/whats_new_api.go @@ -50,12 +50,12 @@ func getWhatsNew(c *fiber.Ctx) error { var items []models.Event if err := database.C. - Where("channel_id IN ?", lookupRange). Limit(take). Order("created_at DESC"). Preload("Sender"). Preload("Sender.Account"). Preload("Channel"). + Preload("Channel.Realm"). Find(&items).Error; err != nil { return fiber.NewError(fiber.StatusBadRequest, err.Error()) }