public IActionResult Register([FromBody] RegisterModel model) { var addedUser = _addUserRequestHandler.Handle(model).Result; _addAccountRequestHandler.Handle(addedUser.Id); return(Ok("Registration successful")); }
public IActionResult AddAccount() { var identity = HttpContext.User.Identity as ClaimsIdentity; IList <Claim> claim = identity.Claims.ToList(); var currentUserId = claim[0].Value; var newAccount = _addAccountRequestHandler.Handle(currentUserId).Result; return(Ok(new { newAccount })); }