Exemplo n.º 1
0
        public async Task <IActionResult> Register(UserRegistrationDTO user)
        {
            user.UserName = user.UserName.ToLower();
            if (await _userService.UserExists(user.UserName))
            {
                return(BadRequest("User Already Exists"));
            }

            await _userService.Register(user);

            return(StatusCode(201));
        }