mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-16 08:54:47 +01:00
Update static data, and don't hard code it
This commit is contained in:
@@ -22,21 +22,19 @@ namespace nksrv.IntlServer
|
||||
SendCodeRequest? ep = JsonConvert.DeserializeObject<SendCodeRequest>(Content);
|
||||
if (ep != null)
|
||||
{
|
||||
string? seg = ctx.GetRequestQueryData().Get("seq");
|
||||
|
||||
// check if the account already exists
|
||||
|
||||
foreach (var item in JsonDb.Instance.Users)
|
||||
{
|
||||
if (item.Username == ep.account)
|
||||
{
|
||||
await WriteJsonStringAsync("{\"msg\":\"send code failed; invalid account\",\"ret\":2112,\"seq\":\"" + seg + "\"}");
|
||||
await WriteJsonStringAsync("{\"msg\":\"send code failed; invalid account\",\"ret\":2112,\"seq\":\"" + Seq + "\"}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// pretend that we sent the code
|
||||
await WriteJsonStringAsync("{\"expire_time\":898,\"msg\":\"Success\",\"ret\":0,\"seq\":\"" + seg + "\"}");
|
||||
await WriteJsonStringAsync("{\"expire_time\":898,\"msg\":\"Success\",\"ret\":0,\"seq\":\"" + Seq + "\"}");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user