Snowflake/RPG.Services.SDK/Handlers/DispatchHandler.cs

52 lines
1.4 KiB
C#
Raw Normal View History

2024-01-18 16:18:25 +00:00
using Microsoft.AspNetCore.Http.HttpResults;
using RPG.Services.SDK.Models.Region;
namespace RPG.Services.SDK.Handlers;
public static class DispatchHandler
{
private const string QueryGatewayUrl = "http://127.0.0.1:8888/query_gateway";
public static JsonHttpResult<QueryDispatchHttpRsp> OnQueryDispatch()
{
return TypedResults.Json(new QueryDispatchHttpRsp
{
Retcode = 0,
TopServerRegionName = "Snowflake",
2024-01-21 15:34:19 +00:00
RegionList =
2024-01-18 16:18:25 +00:00
[
new RegionInfo
{
EnvType = "2",
DispatchUrl = QueryGatewayUrl,
Name = "Snowflake",
Title = "Snowflake"
}
]
});
}
public static JsonHttpResult<QueryGatewayHttpRsp> OnQueryGateway()
{
return TypedResults.Json(new QueryGatewayHttpRsp
{
Retcode = 0,
Message = "OK",
AsbRelogin = 1,
RegionName = "Snowflake",
Gateway = new GatewayInfo
{
Ip = "127.0.0.1",
Port = 20301
},
Ext = new ExtAssetInfo
{
UpdateStreamingAsb = "0",
DataUseAssetBundle = "0",
ForbidRecharge = "0",
ResUseAssetBundle = "0"
}
});
}
}