기초 테스트용 툴 업데이트

This commit is contained in:
김민서 2024-01-30 10:34:22 +09:00
parent 9a99ffcdc7
commit fe29e5e249
2 changed files with 9 additions and 5 deletions

View File

@ -117,5 +117,11 @@ namespace Server.HTML
{ {
await context.Response.WriteAsync(html); await context.Response.WriteAsync(html);
} }
public static async Task Random(HttpContext context)
{
var selectedText = context.Request.Form["selectedText"];
await context.Response.WriteAsync($"The roulette landed on: {selectedText}!");
}
} }
} }

View File

@ -18,12 +18,10 @@ var app = builder.Build();
//app.MapPost("/update", GItWebhook.Process); //app.MapPost("/update", GItWebhook.Process);
#if DEBUG
app.MapGet("/spin", Spin.Main); app.MapGet("/spin", Spin.Main);
app.MapPost("/spin/random", async context => app.MapPost("/spin/random", Spin.Random);
{ #endif
var selectedText = context.Request.Form["selectedText"];
await context.Response.WriteAsync($"The roulette landed on: {selectedText}!");
});
app.Run(Statics.URL); app.Run(Statics.URL);