1
0
forked from baron/baron-sso

fix(backend): correct parameter order in UserRepo.List call for CSV export

This commit is contained in:
2026-03-04 17:28:37 +09:00
parent 5be5ffd42f
commit 16ba7ee47a

View File

@@ -593,7 +593,8 @@ func (h *UserHandler) ExportUsersCSV(c *fiber.Ctx) error {
}
// 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 {
return errorJSON(c, fiber.StatusInternalServerError, "failed to fetch users for export")
}