remove unused code

This commit is contained in:
moux23333
2024-01-28 12:28:25 +08:00
parent 355cf9a836
commit a8c597104e
2 changed files with 0 additions and 55 deletions

View File

@@ -1,32 +0,0 @@
namespace FreeSR.Dispatch.Handlers.Sdk
{
using Ceen;
using FreeSR.Database;
using FreeSR.Database.Account;
internal class CreateAccountHandler : IHttpModule
{
public async Task<bool> HandleAsync(IHttpContext context)
{
var query = context.Request.QueryString;
var name = query["user"];
var password = query["pass"];
var database = DatabaseManager.Instance.Get<AccountDatabase>();
var account = await database.Create(name, password);
context.Response.StatusCode = HttpStatusCode.OK;
if (account == null)
{
await context.Response.WriteAllAsync("Sorry, this username is already taken.", "text/plain");
}
else
{
await context.Response.WriteAllAsync($"Successfully created account with name {account.Name}, uid: {account.Uid}", "text/plain");
}
return true;
}
}
}