🐛 Fix getting publisher

This commit is contained in:
LittleSheep 2025-02-22 22:50:38 +08:00
parent 87b6bee1f3
commit ed77a443b8

View File

@ -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)