You've already forked CC-Framework.BriskGameServer
Add package sync workflow
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public sealed class BriskConfigModule
|
||||
: BriskModuleBase
|
||||
{
|
||||
public async Task<BriskConfigCurrent> GetCurrentAsync()
|
||||
{
|
||||
return await ExecutePublicAsync(async context =>
|
||||
{
|
||||
var data = await context.HttpClient.GetDataAsync("/config/current", CreateQuery(context), false);
|
||||
return BriskModelMapper.ToConfigCurrent(data);
|
||||
});
|
||||
}
|
||||
|
||||
public Task<BriskConfigCurrent> RefreshAsync()
|
||||
{
|
||||
return GetCurrentAsync();
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> CreateQuery(BriskContext context)
|
||||
{
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
{ "game_key", context.Options.GameKey },
|
||||
{ "client_version", context.Options.ClientVersion }
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f50e09c77d7e3f24a9b879d4e0f21c76
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user