upgrade to .net 8
This commit is contained in:
@@ -7,16 +7,30 @@ namespace Blahblah.FlowerStory.Server.Controller;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[Route("")]
|
||||
public class SwaggerController : ControllerBase
|
||||
public class SwaggerController(SwaggerGenerator generator) : ControllerBase
|
||||
{
|
||||
private readonly SwaggerGenerator generator;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public SwaggerController(SwaggerGenerator generator)
|
||||
[Route("login")]
|
||||
[Produces("text/html")]
|
||||
[HttpGet]
|
||||
public ActionResult Login()
|
||||
{
|
||||
this.generator = generator;
|
||||
var address = Request.Host.Host == "api.tsanie.com" ? "183.63.123.9" : "172.16.0.1";
|
||||
return Content($@"<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<meta charset=""utf-8""/>
|
||||
<meta name=""viewport"" content=""width=device-width, initial-scale=1"">
|
||||
</head>
|
||||
<body>
|
||||
<button>Login</button>
|
||||
<p>Will redirect to {address}</p>
|
||||
</body>
|
||||
</html>", "text/html");
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
[Route("")]
|
||||
[Produces("text/html")]
|
||||
@@ -42,8 +56,8 @@ public class SwaggerController : ControllerBase
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url=""/swagger/{Program.Version}/swagger.json""></redoc>
|
||||
<script src=""/js/redoc.standalone.js""> </script>
|
||||
<redoc spec-url=""swagger/{Program.Version}/swagger.json""></redoc>
|
||||
<script src=""js/redoc.standalone.js""> </script>
|
||||
</body>
|
||||
</html>", "text/html");
|
||||
}
|
||||
|
Reference in New Issue
Block a user