forked from baron/baron-sso
fix(backend): correct parameter order in UserRepo.List call for CSV export
This commit is contained in:
@@ -593,7 +593,8 @@ func (h *UserHandler) ExportUsersCSV(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 1. Fetch Users using Repo for efficiency
|
// 1. Fetch Users using Repo for efficiency
|
||||||
users, _, err := h.UserRepo.List(c.Context(), 10000, 0, search, companyCode)
|
// repo.List expects (ctx, offset, limit, search, companyCode)
|
||||||
|
users, _, err := h.UserRepo.List(c.Context(), 0, 10000, search, companyCode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errorJSON(c, fiber.StatusInternalServerError, "failed to fetch users for export")
|
return errorJSON(c, fiber.StatusInternalServerError, "failed to fetch users for export")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user