From ed77a443b82c4957268026d6a41ab0ba26b2477e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 22 Feb 2025 22:50:38 +0800 Subject: [PATCH] :bug: Fix getting publisher --- pkg/internal/services/posts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/services/posts.go b/pkg/internal/services/posts.go index d2d0090..54f0bc7 100644 --- a/pkg/internal/services/posts.go +++ b/pkg/internal/services/posts.go @@ -68,7 +68,7 @@ func FilterPostWithUserContext(c *fiber.Ctx, tx *gorm.DB, user *authm.Account) * } else { // Get itself var publisher models.Publisher - if err := database.C.Where("id = ?", user.ID).First(&publisher).Error; err != nil { + if err := database.C.Where("account_id = ?", user.ID).First(&publisher).Error; err != nil { return tx } allowlist = append(allowlist, publisher.ID)