Пример #1
0
        public async Task <IHttpActionResult> GetPassword(string email)
        {
            bool isExists = authBL.CheckEmailExists(email);

            if (isExists)
            {
                var isSent = await authBL.SendEmail(email);

                if (isSent)
                {
                    return(Ok());
                }
                else
                {
                    return(InternalServerError());
                }
            }
            else
            {
                return(BadRequest(JsonConvert.SerializeObject(new { ErrorMessage = "Email Doesn't registred!" })));
            }
        }