public async Task <IActionResult> Register([FromBody] RegisterInputModel model) { if (ModelState.IsValid) { return((await _authenticateOrchestrator.RegisterAsync(model)).ToJsonResult()); } return(new ActionResponse(ModelState).ToJsonResult()); }
public async Task <ActionResult> Register(RegisterInputModel model, bool consent, string leaveBlank) { if (leaveBlank != null) { ViewBag.Message = "You appear to be a spambot"; } else if (ModelState.IsValid) { if (!consent) { ViewBag.Message = "Please acknowledge your consent"; } else { var response = await _authenticateOrchestrator.RegisterAsync(model); ViewBag.Message = response.Message; } } return(View(model)); }