Add admin password reset functionality for users and customers
This commit is contained in:
@@ -143,6 +143,18 @@ func Conflict(c echo.Context, message string) error {
|
||||
})
|
||||
}
|
||||
|
||||
// TooManyRequests returns a 429 Too Many Requests response
|
||||
func TooManyRequests(c echo.Context, message string) error {
|
||||
return c.JSON(http.StatusTooManyRequests, APIResponse{
|
||||
Success: false,
|
||||
Message: "Too Many Requests",
|
||||
Error: &APIError{
|
||||
Code: "TOO_MANY_REQUESTS",
|
||||
Message: message,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// ValidationError returns a 422 Unprocessable Entity response
|
||||
func ValidationError(c echo.Context, message, details string) error {
|
||||
return c.JSON(http.StatusUnprocessableEntity, APIResponse{
|
||||
|
||||
Reference in New Issue
Block a user