public IActionResult RejectRequest(string id) { var claimsIdentity = (ClaimsIdentity)this.User.Identity; var claim = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier); if (claim != null) { var userId = claim.Value; _context.changeRequestStatus(id, userId, Status.RequestRejected); } return(Json("success")); }