add warning if auth token is unknown

This commit is contained in:
Mikhail
2024-07-17 09:35:00 -04:00
parent 9cf99754d6
commit 10f0641e77

View File

@@ -2,6 +2,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using nksrv.Utils;
using Swan.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -60,12 +61,14 @@ namespace nksrv.IntlServer
if (User == null)
{
Logger.Warn("Unknown auth token");
await WriteJsonStringAsync("{\"msg\":\"expired verify_code!\",\"ret\":2022,\"seq\":\"" + Seq + "\"}\r\n");
return;
}
}
else
{
Logger.Warn("Failed to parse auth data");
await WriteJsonStringAsync("{\"msg\":\"expired verify_code!\",\"ret\":2022,\"seq\":\"" + Seq + "\"}\r\n");
return;
}