Example #1
0
        public async Task <IActionResult> ResetPasswordMailRequest([FromBody] User user)
        {
            try
            {
                var responseOnReset = await _handler.ResetPasswordMailRequest(user);

                return(StatusCode(StatusCodes.Status202Accepted, responseOnReset.ToString()));
            }
            catch (Exception e)
            {
                if (e is ServerException)
                {
                    return(StatusCode(StatusCodes.Status500InternalServerError, new ErrorResponse(error: Text.ServerException, errorMessage: e.ToString()).ToString()));
                }
                return(StatusCode(StatusCodes.Status500InternalServerError, new ErrorResponse(error: Text.InternalServerError, errorMessage: e.ToString()).ToString()));
            }
        }