mirror of
https://github.com/snltty/linker.git
synced 2025-12-18 17:36:45 +08:00
26 lines
624 B
C#
26 lines
624 B
C#
using linker.messenger.relay.server;
|
|
|
|
namespace linker.messenger.store.file.relay
|
|
{
|
|
public sealed class RelayServerStore : IRelayServerStore
|
|
{
|
|
public string SecretKey => config.Data.Server.Relay.SecretKey;
|
|
private readonly FileConfig config;
|
|
public RelayServerStore(FileConfig config)
|
|
{
|
|
this.config = config;
|
|
}
|
|
|
|
public void SetSecretKey(string secretKey)
|
|
{
|
|
config.Data.Server.Relay.SecretKey = secretKey;
|
|
}
|
|
|
|
public bool Confirm()
|
|
{
|
|
config.Data.Update();
|
|
return true;
|
|
}
|
|
}
|
|
}
|