Skip to content

Commit

Permalink
Updated Detail action method to use action result types
Browse files Browse the repository at this point in the history
  • Loading branch information
Binh Le committed Oct 7, 2019
1 parent 5bcf9be commit 1b58ea4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ namespace ComicBookGallery.Controllers
{
public class ComicBooksController : Controller
{
public string Detail()
public ActionResult Detail()
{
return "Hello from the comic books controller!";
if (DateTime.Today.DayOfWeek == DayOfWeek.Tuesday)
{
return Redirect("/");
}
return Content("Hello from the comic books controller!");
}
}
}

0 comments on commit 1b58ea4

Please sign in to comment.