allow host to change runtime and rendermode settings in System Info

This commit is contained in:
Shaun Walker
2021-06-06 11:04:37 -04:00
parent 900ea8cfbc
commit 54cd360bb5
4 changed files with 53 additions and 4 deletions

View File

@ -37,5 +37,23 @@ namespace Oqtane.Controllers
return systeminfo;
}
[HttpPost]
[Authorize(Roles = RoleNames.Host)]
public void Post([FromBody] Dictionary<string, string> settings)
{
foreach(KeyValuePair<string, string> kvp in settings)
{
switch (kvp.Key)
{
case "runtime":
_configManager.AddOrUpdateSetting("Runtime", kvp.Value, false);
break;
case "rendermode":
_configManager.AddOrUpdateSetting("RenderMode", kvp.Value, false);
break;
}
}
}
}
}