mirror of
https://github.com/snltty/linker.git
synced 2025-12-18 09:26:44 +08:00
28 lines
649 B
C#
28 lines
649 B
C#
|
|
using linker.messenger.updater;
|
|
|
|
namespace linker.messenger.store.file.updater
|
|
{
|
|
public sealed class UpdaterServerStore : IUpdaterServerStore
|
|
{
|
|
public string SecretKey => fileConfig.Data.Server.Updater.SecretKey;
|
|
|
|
private readonly FileConfig fileConfig;
|
|
public UpdaterServerStore(FileConfig fileConfig)
|
|
{
|
|
this.fileConfig = fileConfig;
|
|
}
|
|
|
|
public void SetSecretKey(string key)
|
|
{
|
|
fileConfig.Data.Server.Updater.SecretKey = key;
|
|
}
|
|
|
|
public bool Confirm()
|
|
{
|
|
fileConfig.Data.Update();
|
|
return true;
|
|
}
|
|
}
|
|
}
|