mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
fix: add order_by and sort_by query to master data employee
This commit is contained in:
@@ -24,9 +24,11 @@ func NewEmployeesController(employeesService service.EmployeesService) *Employee
|
||||
|
||||
func (u *EmployeesController) GetAll(c *fiber.Ctx) error {
|
||||
query := &validation.Query{
|
||||
Page: c.QueryInt("page", 1),
|
||||
Limit: c.QueryInt("limit", 10),
|
||||
Search: c.Query("search", ""),
|
||||
Page: c.QueryInt("page", 1),
|
||||
Limit: c.QueryInt("limit", 10),
|
||||
Search: c.Query("search", ""),
|
||||
OrderBy: c.Query("order_by", "desc"),
|
||||
SortBy: c.Query("sort_by", "updated_at"),
|
||||
}
|
||||
|
||||
if query.Page < 1 || query.Limit < 1 {
|
||||
|
||||
Reference in New Issue
Block a user