public ActionResult ForgotPassword(SendPasswordRecoveryLinkCommand command) { if (!ModelState.IsValid) { return(View("ForgotPassword")); } var result = _commandBus.Send(command); return(JsonMessage(result)); }
public HttpResponseMessage ForgotPassword(SendPasswordRecoveryLinkCommand command) { if (!ModelState.IsValid) { return(Request.CreateResponse()); } var result = _commandBus.Send(command); if (result.Success) { return(Request.CreateResponse(result.Success ? HttpStatusCode.OK : HttpStatusCode.ExpectationFailed)); } return(Request.CreateResponse(result.Success ? HttpStatusCode.OK : HttpStatusCode.ExpectationFailed)); }