Пример #1
0
        public ActionResult Register([FromBody] CustomerDetail user)
        {
            var u = _loginsvc.GetUser(user.Email);

            if (u != null)
            {
                return(BadRequest("User already exists."));
            }

            user.SetPassword(user.Password, _encryptor);
            user.EncryptImage(user.Profile_Photo);
            _loginsvc.InsertUser(user);
            var Message = new
            {
                Code    = "0",
                Message = "Success"
            };

            return(Ok(Message));

            //return Ok();
        }