fix: add sort_by and order_by query in master data kandang and kandang groups API

This commit is contained in:
ValdiANS
2026-05-04 11:54:19 +07:00
parent cee59c2b99
commit b2be67e052
6 changed files with 24 additions and 2 deletions
@@ -29,6 +29,8 @@ func (u *KandangGroupController) GetAll(c *fiber.Ctx) error {
Search: c.Query("search", ""),
LocationId: c.QueryInt("location_id", 0),
PicId: c.QueryInt("pic_id", 0),
OrderBy: c.Query("order_by", "desc"),
SortBy: c.Query("sort_by", "updated_at"),
}
if query.Page < 1 || query.Limit < 1 {