mirror of
https://github.com/raphaeIl/Novaria.git
synced 2025-12-17 08:54:44 +01:00
hardcoded sdk, new en keys
This commit is contained in:
@@ -8,19 +8,53 @@ namespace Novaria.GameServer.Controllers
|
||||
[Route("/")]
|
||||
public class SDKController : ControllerBase
|
||||
{
|
||||
[HttpPost("yostar/send-code")]
|
||||
public IResult SendCode()
|
||||
{
|
||||
return Results.Content(
|
||||
@"
|
||||
{
|
||||
""Code"": 200,
|
||||
""Data"": {},
|
||||
""Msg"": ""OK""
|
||||
}
|
||||
"
|
||||
, "application/json");
|
||||
}
|
||||
|
||||
[HttpPost("yostar/get-auth")]
|
||||
public IResult GetAuth()
|
||||
{
|
||||
return Results.Content(
|
||||
@"
|
||||
{
|
||||
""Code"": 200,
|
||||
""Data"": {
|
||||
""Account"": ""seggs@gmail.com"",
|
||||
""Token"": ""sdfsdfsdfsdf"",
|
||||
""UID"": ""seggs@gmail.com""
|
||||
},
|
||||
""Msg"": ""OK""
|
||||
}
|
||||
"
|
||||
, "application/json");
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("user/oauth2/v2/grant")]
|
||||
public IResult OAuthGrant()
|
||||
{
|
||||
return Results.Content(
|
||||
@"
|
||||
{
|
||||
""msg"": ""夏萝莉是小楠梁"",
|
||||
""msg"": ""sss"",
|
||||
""status"": 106,
|
||||
""type"": ""A""
|
||||
}",
|
||||
"application/json"
|
||||
);
|
||||
}
|
||||
|
||||
[Route("")]
|
||||
public IResult GetNothing()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,21 @@ namespace Novaria.GameServer.Controllers
|
||||
[Route("/user")]
|
||||
public class UserController : ControllerBase
|
||||
{
|
||||
[Route("set")]
|
||||
public IResult PostSet()
|
||||
{
|
||||
Log.Information("post set received!");
|
||||
|
||||
string jsonResponse = @"
|
||||
{
|
||||
""Code"": 200,
|
||||
""Data"": {},
|
||||
""Msg"": ""OK""
|
||||
}
|
||||
";
|
||||
return Results.Text(jsonResponse, "application/json");
|
||||
}
|
||||
|
||||
[Route("login")]
|
||||
public IResult PostLogin()
|
||||
{
|
||||
@@ -16,14 +31,28 @@ namespace Novaria.GameServer.Controllers
|
||||
{
|
||||
""Code"": 200,
|
||||
""Data"": {
|
||||
""IsNew"": true,
|
||||
""IsTestAccount"": false,
|
||||
""User"": {
|
||||
""DestroyState"": 0,
|
||||
""ID"": 1,
|
||||
""PID"": ""CN-NOVA"",
|
||||
""AgeVerifyMethod"": 0,
|
||||
""IsNew"": 1,
|
||||
""UserInfo"": {
|
||||
""ID"": ""69"",
|
||||
""UID2"": 0,
|
||||
""PID"": ""US-NOVA-TEST"",
|
||||
""Token"": ""seggs"",
|
||||
""Birthday"": """",
|
||||
""RegChannel"": ""pc"",
|
||||
""TransCode"": """",
|
||||
""State"": 1,
|
||||
""Token"": ""f94d936f7235f84493564ee0282e845cccd44828""
|
||||
""DeviceID"": """",
|
||||
""CreatedAt"": 1748359959
|
||||
},
|
||||
""Yostar"": {
|
||||
""ID"": ""Y69"",
|
||||
""Country"": ""US"",
|
||||
""Nickname"": """",
|
||||
""Picture"": """",
|
||||
""State"": 1,
|
||||
""AgreeAd"": 0,
|
||||
""CreatedAt"": 1654600174
|
||||
}
|
||||
},
|
||||
""Msg"": ""OK""
|
||||
@@ -41,40 +70,42 @@ namespace Novaria.GameServer.Controllers
|
||||
{
|
||||
""Code"": 200,
|
||||
""Data"": {
|
||||
""Destroy"": {
|
||||
""DestroyAt"": 0
|
||||
},
|
||||
""Identity"": {
|
||||
""BirthDate"": """",
|
||||
""IDCard"": ""123*********34567"",
|
||||
""PI"": """",
|
||||
""RealName"": ""**"",
|
||||
""State"": 1,
|
||||
""Type"": 0,
|
||||
""Underage"": false
|
||||
},
|
||||
""AgeVerifyMethod"": 0,
|
||||
""Destroy"": null,
|
||||
""IsTestAccount"": false,
|
||||
""Keys"": [
|
||||
{
|
||||
""NickName"": ""123****4567"",
|
||||
""Type"": ""mobile""
|
||||
""ID"": ""69"",
|
||||
""Type"": ""yostar"",
|
||||
""Key"": ""seggs@gmail.com"",
|
||||
""NickName"": ""seggs@gmail.com"",
|
||||
""CreatedAt"": 1654600175
|
||||
}
|
||||
],
|
||||
""User"": {
|
||||
""DestroyState"": 0,
|
||||
""ID"": 1,
|
||||
""PID"": ""CN-NOVA"",
|
||||
""ServerNowAt"": 1748359960,
|
||||
""UserInfo"": {
|
||||
""ID"": ""69"",
|
||||
""UID2"": 0,
|
||||
""PID"": ""US-NOVA-TEST"",
|
||||
""Token"": ""seggs"",
|
||||
""Birthday"": """",
|
||||
""RegChannel"": ""pc"",
|
||||
""TransCode"": """",
|
||||
""State"": 1,
|
||||
""Token"": ""f94d936f723asdasd5f84493564ee0282e845cccd44828""
|
||||
""DeviceID"": """",
|
||||
""CreatedAt"": 1748359959
|
||||
},
|
||||
""Yostar"": {
|
||||
""CreatedAt"": 1735902322,
|
||||
""DefaultNickName"": """",
|
||||
""ID"": 1,
|
||||
""NickName"": ""seggs"",
|
||||
""ID"": ""Y69"",
|
||||
""Country"": ""US"",
|
||||
""Nickname"": """",
|
||||
""Picture"": """",
|
||||
""State"": 1
|
||||
}
|
||||
""State"": 1,
|
||||
""AgreeAd"": 0,
|
||||
""CreatedAt"": 1654600174
|
||||
},
|
||||
""YostarDestroy"": null
|
||||
|
||||
},
|
||||
""Msg"": ""OK""
|
||||
}
|
||||
@@ -88,42 +119,43 @@ namespace Novaria.GameServer.Controllers
|
||||
{
|
||||
string jsonResponse = @"
|
||||
{
|
||||
""Code"": 200,
|
||||
""Data"": {
|
||||
""Destroy"": {
|
||||
""DestroyAt"": 0
|
||||
},
|
||||
""Identity"": {
|
||||
""BirthDate"": """",
|
||||
""IDCard"": ""123*********34567*"",
|
||||
""PI"": """",
|
||||
""RealName"": ""**"",
|
||||
""State"": 1,
|
||||
""Type"": 0,
|
||||
""Underage"": false
|
||||
},
|
||||
""Code"": 200,
|
||||
""Data"": {
|
||||
""AgeVerifyMethod"": 0,
|
||||
""Destroy"": null,
|
||||
""IsTestAccount"": false,
|
||||
""Keys"": [
|
||||
{
|
||||
""NickName"": ""123****4567"",
|
||||
""Type"": ""mobile""
|
||||
""ID"": ""69"",
|
||||
""Type"": ""yostar"",
|
||||
""Key"": ""seggs@gmail.com"",
|
||||
""NickName"": ""seggs@gmail.com"",
|
||||
""CreatedAt"": 1654600175
|
||||
}
|
||||
],
|
||||
""User"": {
|
||||
""DestroyState"": 0,
|
||||
""ID"": 1,
|
||||
""PID"": ""CN-NOVA"",
|
||||
""ServerNowAt"": 1748359960,
|
||||
""UserInfo"": {
|
||||
""ID"": ""69"",
|
||||
""UID2"": 0,
|
||||
""PID"": ""US-NOVA-TEST"",
|
||||
""Token"": ""seggs"",
|
||||
""Birthday"": """",
|
||||
""RegChannel"": ""pc"",
|
||||
""TransCode"": """",
|
||||
""State"": 1,
|
||||
""Token"": ""f9s243e483e3e322138""
|
||||
""DeviceID"": """",
|
||||
""CreatedAt"": 1748359959
|
||||
},
|
||||
""Yostar"": {
|
||||
""CreatedAt"": 1,
|
||||
""DefaultNickName"": """",
|
||||
""ID"": 1,
|
||||
""NickName"": ""seggs"",
|
||||
""ID"": ""Y69"",
|
||||
""Country"": ""US"",
|
||||
""Nickname"": """",
|
||||
""Picture"": """",
|
||||
""State"": 1
|
||||
}
|
||||
""State"": 1,
|
||||
""AgreeAd"": 0,
|
||||
""CreatedAt"": 1654600174
|
||||
},
|
||||
""YostarDestroy"": null
|
||||
},
|
||||
""Msg"": ""OK""
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Novaria.GameServer.Services
|
||||
|
||||
this.LoadCommonBin<T>(bytesFilePath); // after this, loaded table will be in the cache
|
||||
|
||||
logger.LogDebug("{Excel} loaded and cached", type.Name);
|
||||
Log.Information("{Excel} Table loaded and cached", type.Name);
|
||||
|
||||
return caches[currentTableTypeCache];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user