public IHttpActionResult GetCreditInfo(int id) { var userId = User.Identity.GetUserId().Value; var creditInfo = _creditService.GetCreditInfo(userId, id); if (!creditInfo.Success) { return(BadRequest(creditInfo.Message)); } else { return(Ok(creditInfo)); } }
public ActionResult InstallmentsPage(int Id) { var userId = User.Identity.GetUserId().Value; var creditInfo = _creditService.GetCreditInfo(userId, Id); if (!creditInfo.Success) { return(RedirectToAction("Index", "UserInfo")); } else { return(View(creditInfo.Data)); } }