예제 #1
0
        public async Task <IActionResult> ForgotPassword([FromBody] string email)
        {
            var response = new SingleModelResponse <Athlete>()
                           as ISingleModelResponse <Athlete>;

            try
            {
                if (email == null)
                {
                    throw new Exception("Email Address is missing");
                }
                response.Model = await Task.Run(() =>
                {
                    return(_context.ForgotPassword(email));
                });
            }
            catch (Exception ex)
            {
                response.DidError     = true;
                response.ErrorMessage = ex.Message;
            }
            return(response.ToHttpResponse());
        }