Remove obsolete customer endpoint and update related documentation
- Deleted the `/admin/v1/customers/{id}/with-companies` endpoint from the API documentation and Swagger files to streamline the API structure.
- Updated the router to remove the corresponding route registration for the deprecated endpoint.
- Enhanced the company repository and service to support batch retrieval of companies by IDs, improving efficiency in data handling.
- Adjusted customer service methods to utilize the new batch retrieval functionality for loading companies associated with customers.
- Improved logging practices to provide better traceability for company retrieval operations.
This commit is contained in:
@@ -73,9 +73,7 @@ func RegisterAdminRoutes(e *echo.Echo, userHandler *user.Handler, companyHandler
|
||||
customersGP.Use(userHandler.AuthMiddleware())
|
||||
customersGP.POST("", customerHandler.CreateCustomer)
|
||||
customersGP.GET("", customerHandler.ListCustomers)
|
||||
customersGP.GET("/with-companies", customerHandler.ListCustomersWithCompanies)
|
||||
customersGP.GET("/:id", customerHandler.GetCustomerByID)
|
||||
customersGP.GET("/:id/with-companies", customerHandler.GetCustomerByIDWithCompanies)
|
||||
customersGP.PUT("/:id", customerHandler.UpdateCustomer)
|
||||
customersGP.DELETE("/:id", customerHandler.DeleteCustomer)
|
||||
customersGP.PATCH("/:id/status", customerHandler.UpdateCustomerStatus)
|
||||
|
||||
Reference in New Issue
Block a user