Add Password Reset Functionality and Update API Documentation
- Implemented password reset functionality, including endpoints for requesting a reset code, verifying the OTP, and resetting the password. - Introduced new request and response forms for password reset operations, ensuring proper validation and structured responses. - Enhanced the customer service layer to handle password reset requests, OTP verification, and password updates, utilizing Redis for temporary token storage. - Updated Swagger and YAML documentation to include new API endpoints and their specifications, improving clarity for API consumers. - Refactored the customer handler to manage new password reset routes, ensuring adherence to clean architecture principles.
This commit is contained in:
@@ -137,6 +137,11 @@ func RegisterPublicRoutes(e *echo.Echo, customerHandler *customer.Handler, tende
|
||||
customerGP.POST("/login", customerHandler.Login)
|
||||
customerGP.POST("/refresh-token", customerHandler.RefreshToken)
|
||||
|
||||
// Forgot password routes
|
||||
customerGP.POST("/forgot-password", customerHandler.RequestResetPassword)
|
||||
customerGP.POST("/verify-otp", customerHandler.VerifyOTP)
|
||||
customerGP.POST("/reset-password", customerHandler.ResetPassword)
|
||||
|
||||
profileGP := customerGP.Group("")
|
||||
profileGP.Use(customerHandler.AuthMiddleware())
|
||||
profileGP.GET("", customerHandler.GetProfile)
|
||||
|
||||
Reference in New Issue
Block a user