🐛 Bug fixes on query statement

This commit is contained in:
2024-11-02 23:47:44 +08:00
parent 553a87ab78
commit f9a01bff70
8 changed files with 12 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ func listPinnedPost(c *fiber.Ctx) error {
}
tx := services.FilterPostDraft(database.C)
tx = tx.Where("author_id = ?", user.ID)
tx = tx.Where("publisher_id = ?", user.ID)
tx = tx.Where("pinned_at IS NOT NULL")
items, err := services.ListPost(tx, 100, 0, "published_at DESC")