From 9a99ffcdc78dc1f834fb2552f1e49b314f2e5eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=84=9C?= Date: Mon, 29 Jan 2024 17:41:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=82=98=EC=A4=91=EC=97=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=ED=95=A0=EA=B2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/HTML/Spin.cs | 121 ++++++++++++++++++++++++++++++++++++++++++++ Server/Program.cs | 116 +----------------------------------------- 2 files changed, 123 insertions(+), 114 deletions(-) create mode 100644 Server/HTML/Spin.cs diff --git a/Server/HTML/Spin.cs b/Server/HTML/Spin.cs new file mode 100644 index 0000000..fefa184 --- /dev/null +++ b/Server/HTML/Spin.cs @@ -0,0 +1,121 @@ + +namespace Server.HTML +{ + public class Spin + { + private static string html = @" + + + + Roulette + + + +
+

Spin the Roulette!

+
+ + + +
+ + + +
+ + + +"; + public static async Task Main(HttpContext context) + { + await context.Response.WriteAsync(html); + } + } +} diff --git a/Server/Program.cs b/Server/Program.cs index a9f8123..7d82e5e 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -1,3 +1,4 @@ +using Server.HTML; using Server.System; var builder = WebApplication.CreateBuilder(args); @@ -17,120 +18,7 @@ var app = builder.Build(); //app.MapPost("/update", GItWebhook.Process); -app.MapGet("/spin", async context => -{ - await context.Response.WriteAsync(@" - - - - Roulette - - - -
-

Spin the Roulette!

-
- - - -
- - - -
- - - - - "); -}); +app.MapGet("/spin", Spin.Main); app.MapPost("/spin/random", async context => {