Ability to update settings. Take effect on next reboot.
This commit is contained in:
parent
e60f795410
commit
1050fa4e54
21 changed files with 953 additions and 146 deletions
|
|
@ -9,16 +9,24 @@ namespace API.Helpers.Converters
|
|||
{
|
||||
public ServerSettingDto Convert(IEnumerable<ServerSetting> source, ServerSettingDto destination, ResolutionContext context)
|
||||
{
|
||||
destination = new ServerSettingDto();
|
||||
destination ??= new ServerSettingDto();
|
||||
foreach (var row in source)
|
||||
{
|
||||
switch (row.Key)
|
||||
{
|
||||
case "CacheDirectory":
|
||||
case ServerSettingKey.CacheDirectory:
|
||||
destination.CacheDirectory = row.Value;
|
||||
break;
|
||||
default:
|
||||
case ServerSettingKey.TaskScan:
|
||||
destination.TaskScan = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.LoggingLevel:
|
||||
destination.LoggingLevel = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.TaskBackup:
|
||||
destination.TaskBackup = row.Value;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue