From c9000b20fe5ed12382c322e38f25c31f1482d6c5 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 16:02:16 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A3=B0=EB=9E=AB=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 18 +------ Server/Program.cs | 129 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 126 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 8e4b7d8..c127cda 100644 --- a/.gitignore +++ b/.gitignore @@ -2,20 +2,6 @@ # Created by https://www.toptal.com/developers/gitignore/api/unity # Edit at https://www.toptal.com/developers/gitignore?templates=unity -### Unity ### -# This .gitignore file should be placed at the root of your Unity project directory -# -# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore -/Client/[Ll]ibrary/ -/Client/[Tt]emp/ -/Client/[Oo]bj/ -/Client/[Bb]uild/ -/Client/[Ll]ogs/ -/Client/[Uu]ser[Ss]ettings/ - -# MemoryCaptures can get excessive in size. -# They also could contain extremely sensitive data -/Client/[Mm]emoryCaptures/ # Recordings can get excessive in size /Client/[Rr]ecordings/ @@ -26,6 +12,7 @@ # Visual Studio cache directory .vs Server/bin +Server/obj # Visual Code directory .vscode/ @@ -47,6 +34,3 @@ ExportedObj/ *.mdb *.opendb *.VC.db - -# Builds -bin diff --git a/Server/Program.cs b/Server/Program.cs index d2868e8..a9f8123 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -5,16 +5,137 @@ var app = builder.Build(); //À¥¼­¹ö ÃʱâÈ­ -ProtocolProcessor.Init(); +//ProtocolProcessor.Init(); //±ê À¥ÈÅ ÃʱâÈ­ -GItWebhook.Init(); +//GItWebhook.Init(); //http¿ë µ¥ÀÌÅÍ -app.MapPost("/", ProtocolProcessor.Process); +//app.MapPost("/", ProtocolProcessor.Process); //git Á¢±Ù¿ë À¥ÈÅ -app.MapPost("/git", GItWebhook.Process); +//app.MapPost("/git", GItWebhook.Process); //app.MapPost("/update", GItWebhook.Process); +app.MapGet("/spin", async context => +{ + await context.Response.WriteAsync(@" + + + + Roulette + + + +
+

Spin the Roulette!

+
+ + + +
+ + + +
+ + + + + "); +}); + +app.MapPost("/spin/random", async context => +{ + var selectedText = context.Request.Form["selectedText"]; + await context.Response.WriteAsync($"The roulette landed on: {selectedText}!"); +}); + app.Run(Statics.URL);