Filtering post with realm in querystring

This commit is contained in:
2025-02-20 21:36:47 +08:00
parent ecc2bff9a0
commit ed8afe8324
2 changed files with 17 additions and 0 deletions

View File

@ -55,6 +55,10 @@ func UniversalPostFilter(c *fiber.Ctx, tx *gorm.DB) (*gorm.DB, error) {
tx = services.FilterPostWithType(tx, c.Query("type"))
}
if len(c.Query("realm")) > 0 {
tx = services.FilterPostWithRealm(tx, c.Query("realm"))
}
return tx, nil
}