Refactor Customer API Endpoints and Update Documentation
- Changed customer-related API endpoints to improve clarity and consistency, including renaming and restructuring routes. - Removed unused query parameters and handlers, streamlining the customer management functionality. - Updated customer entity and forms to reflect new example values for enhanced API documentation clarity. - Enhanced response structures to return customer entities directly, simplifying the response handling in API endpoints. - Updated API documentation to reflect changes in endpoint structure and response formats, ensuring consistency for API consumers.
This commit is contained in:
@@ -71,20 +71,11 @@ func RegisterAdminRoutes(e *echo.Echo, userHandler *user.Handler, companyHandler
|
||||
{
|
||||
customersGP.Use(userHandler.AuthMiddleware())
|
||||
customersGP.POST("", customerHandler.CreateCustomer)
|
||||
customersGP.GET("", customerHandler.ListCustomers)
|
||||
customersGP.GET("", customerHandler.Search)
|
||||
customersGP.GET("/:id", customerHandler.GetCustomerByID)
|
||||
customersGP.PUT("/:id", customerHandler.UpdateCustomer)
|
||||
customersGP.DELETE("/:id", customerHandler.DeleteCustomer)
|
||||
customersGP.PATCH("/:id/status", customerHandler.UpdateCustomerStatus)
|
||||
customersGP.PATCH("/:id/verification", customerHandler.UpdateCustomerVerification)
|
||||
customersGP.POST("/:id/verify", customerHandler.VerifyCustomer)
|
||||
customersGP.POST("/:id/suspend", customerHandler.SuspendCustomer)
|
||||
customersGP.POST("/:id/activate", customerHandler.ActivateCustomer)
|
||||
customersGP.GET("/company/:companyId", customerHandler.GetCustomersByCompanyID)
|
||||
customersGP.GET("/type/:type", customerHandler.GetCustomersByType)
|
||||
customersGP.GET("/status/:status", customerHandler.GetCustomersByStatus)
|
||||
customersGP.POST("/:id/companies/assign", customerHandler.AssignCompaniesToCustomer)
|
||||
customersGP.POST("/:id/companies/remove", customerHandler.RemoveCompaniesFromCustomer)
|
||||
customersGP.PUT("/:id/status", customerHandler.UpdateStatus)
|
||||
}
|
||||
|
||||
// Admin Tenders Routes
|
||||
|
||||
Reference in New Issue
Block a user