add query param filter has laying

This commit is contained in:
giovanni
2026-02-23 11:46:31 +07:00
parent 5e28721651
commit b73f13ee76
3 changed files with 21 additions and 8 deletions
@@ -24,10 +24,11 @@ func NewLocationController(locationService service.LocationService) *LocationCon
func (u *LocationController) GetAll(c *fiber.Ctx) error {
query := &validation.Query{
Page: c.QueryInt("page", 1),
Limit: c.QueryInt("limit", 10),
Search: c.Query("search", ""),
AreaId: c.QueryInt("area_id", 0),
Page: c.QueryInt("page", 1),
Limit: c.QueryInt("limit", 10),
Search: c.Query("search", ""),
AreaId: c.QueryInt("area_id", 0),
HasLaying: c.QueryBool("has_laying", false),
}
if query.Page < 1 || query.Limit < 1 {