public IActionResult Details(int id) { var poll = _pollStorage.GetById(id); if (poll == null) { return(NotFound()); } if (poll.State == PollState.NotPublished && Request.Cookies["isCreator"] == "false") { return(Forbid()); } return(Ok(poll)); }