👔 Not showing collapsed post by default

This commit is contained in:
LittleSheep 2025-02-17 23:45:39 +08:00
parent 12ffcb7c5b
commit c1567f713a

View File

@ -32,6 +32,9 @@ func universalPostFilter(c *fiber.Ctx, tx *gorm.DB) (*gorm.DB, error) {
if c.QueryBool("noReply", true) { if c.QueryBool("noReply", true) {
tx = services.FilterPostReply(tx) tx = services.FilterPostReply(tx)
} }
if c.QueryBool("noCollapse", true) {
tx = tx.Where("is_collapsed = ?", false)
}
if len(c.Query("author")) > 0 { if len(c.Query("author")) > 0 {
var author models.Publisher var author models.Publisher