From 98c56a1769e97370543f6a3c6945dbf354d74184 Mon Sep 17 00:00:00 2001 From: Xander Sigler Date: Mon, 2 Jan 2023 23:08:35 -0800 Subject: [PATCH] Added default route to swagger page --- AdventOfCode/Controllers/HomeController.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 AdventOfCode/Controllers/HomeController.cs diff --git a/AdventOfCode/Controllers/HomeController.cs b/AdventOfCode/Controllers/HomeController.cs new file mode 100644 index 0000000..c9d1278 --- /dev/null +++ b/AdventOfCode/Controllers/HomeController.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace AdventOfCode.Controllers +{ + [ApiController] + [ApiExplorerSettings(IgnoreApi = true)] + public class HomeController : ControllerBase + { + [Route("")] + [HttpGet] + public IActionResult Index() + { + return Redirect("/swagger/Index.html"); + } + } +}