refactor: move lists to their representative repos
This commit is contained in:
@@ -70,7 +70,7 @@ func (h *customerHandler) customerData(fc fiber.Ctx) error {
|
||||
}
|
||||
|
||||
func (h *customerHandler) listCustomers(fc fiber.Ctx) error {
|
||||
p, filt, err := query_params.ParseFilters[model.Customer](fc, columnMappingListProducts)
|
||||
p, filt, err := query_params.ParseFilters[model.Customer](fc, columnMappingListUsers)
|
||||
if err != nil {
|
||||
return fc.Status(responseErrors.GetErrorStatus(err)).
|
||||
JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(fc, err)))
|
||||
@@ -94,3 +94,10 @@ func (h *customerHandler) listCustomers(fc fiber.Ctx) error {
|
||||
|
||||
return fc.JSON(response.Make(&customer, 0, i18n.T_(fc, response.Message_OK)))
|
||||
}
|
||||
|
||||
var columnMappingListUsers map[string]string = map[string]string{
|
||||
"user_id": "users.id",
|
||||
"email": "users.email",
|
||||
"first_name": "users.first_name",
|
||||
"second_name": "users.second_name",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user