fix #2567 - migrate tenant connection string details from database to appsettings.json

This commit is contained in:
Shaun Walker
2023-02-23 16:29:15 -05:00
parent 71dd00da0f
commit f2df8e96db
33 changed files with 562 additions and 309 deletions

View File

@ -63,6 +63,12 @@ namespace Oqtane.Controllers
}
systeminfo.Add("Log", log);
break;
case "connectionstrings":
foreach (var kvp in _configManager.GetSettings(SettingKeys.ConnectionStringsSection))
{
systeminfo.Add(kvp.Key, kvp.Value);
}
break;
}
return systeminfo;
@ -88,19 +94,11 @@ namespace Oqtane.Controllers
}
}
// PUT: api/<controller>
[HttpPut("{key}/{value}")]
[Authorize(Roles = RoleNames.Host)]
public void Put(string key, object value)
{
UpdateSetting(key, value);
}
private void UpdateSetting(string key, object value)
{
switch (key)
switch (key.ToLower())
{
case "Log":
case "clearlog":
string path = Path.Combine(_environment.ContentRootPath, "Content", "Log", "error.log");
if (System.IO.File.Exists(path))
{