This commit is contained in:
Tommy Parnell
2022-01-15 19:06:53 -05:00
parent 548df439f6
commit 3022df5cc5

11
http.cs
View File

@@ -49,11 +49,8 @@ namespace aka.terribledev.io
NoStore = true, NoStore = true,
MustRevalidate = true MustRevalidate = true
}; };
var stringBuilder = new StringBuilder(); return new OkObjectResult("livecheck");
stringBuilder.AppendLine("Hi! ^_^");
stringBuilder.AppendLine("Paths:");
stringBuilder.AppendJoin('\n', RoutesDictionary.Keys);
return new OkObjectResult(stringBuilder.ToString());
} }
req.HttpContext.Response.GetTypedHeaders().CacheControl = new Microsoft.Net.Http.Headers.CacheControlHeaderValue() req.HttpContext.Response.GetTypedHeaders().CacheControl = new Microsoft.Net.Http.Headers.CacheControlHeaderValue()
{ {
@@ -62,6 +59,10 @@ namespace aka.terribledev.io
}; };
if (!RoutesDictionary.TryGetValue(name.ToLowerInvariant(), out string result)) if (!RoutesDictionary.TryGetValue(name.ToLowerInvariant(), out string result))
{ {
var stringBuilder = new StringBuilder();
stringBuilder.AppendLine("Hi! ^_^");
stringBuilder.AppendLine("Paths:");
stringBuilder.AppendJoin('\n', RoutesDictionary.Keys);
return new NotFoundObjectResult("hello"); return new NotFoundObjectResult("hello");
} }
else else