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:
n.nakhostin
2025-08-11 19:12:31 +03:30
parent a1db2a9790
commit e3ee3d64ce
8 changed files with 100 additions and 219 deletions
-2
View File
@@ -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)