Ejemplo n.º 1
0
        public ActionResult Register([FromBody] User user)
        {
            if (_userLogic.CheckIfUserExists(user.Username))
            {
                return(BadRequest("User already exists"));
            }

            int id = _userManager.Register(user, _cartLogic.SetDate());

            return(Ok(id));
        }