Example #1
0
        public async Task <IActionResult> SignUp([RegularExpression("^[a-z0-9]{1,50}$")] string username, string password)
        {
            if (ModelState.IsValid && await _userUnitOfWork.CreateUserAsync(username, password))
            {
                return(await LoginUser(username));
            }

            return(View());
        }