add forget password

This commit is contained in:
aditya.siregar
2024-07-23 01:36:25 +07:00
parent 7ea809cc09
commit 5a0dec6128
22 changed files with 907 additions and 76 deletions
+11 -1
View File
@@ -53,6 +53,13 @@ func NewServiceException(errType ErrType) *ServiceException {
}
}
func NewError(errType ErrType, message string) *ServiceException {
return &ServiceException{
errorType: errType,
message: message,
}
}
func (s *ServiceException) ErrorType() ErrType {
return s.errorType
}
@@ -95,7 +102,10 @@ func (s *ServiceException) MapErrorsToCode() Code {
case errUserIsNotFound:
return BadRequest
case errInvalidLogin:
return BadRequest
default:
return ServerError
return BadRequest
}
}