feat(settings): add LogsPath to GetSettingsHandler and SetSettingsHandler
This commit is contained in:
@@ -33,6 +33,8 @@ func GetSettingsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
value = global.CurrentConfig.FrpcPath
|
value = global.CurrentConfig.FrpcPath
|
||||||
case "InstancePath":
|
case "InstancePath":
|
||||||
value = global.CurrentConfig.InstancePath
|
value = global.CurrentConfig.InstancePath
|
||||||
|
case "LogsPath":
|
||||||
|
value = global.CurrentConfig.LogsPath
|
||||||
case "Debug":
|
case "Debug":
|
||||||
value = global.CurrentConfig.Debug
|
value = global.CurrentConfig.Debug
|
||||||
case "Watchdog.Enabled":
|
case "Watchdog.Enabled":
|
||||||
@@ -64,6 +66,7 @@ func GetSettingsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
"ListenPort": global.CurrentConfig.ListenPort,
|
"ListenPort": global.CurrentConfig.ListenPort,
|
||||||
"FrpcPath": global.CurrentConfig.FrpcPath,
|
"FrpcPath": global.CurrentConfig.FrpcPath,
|
||||||
"InstancePath": global.CurrentConfig.InstancePath,
|
"InstancePath": global.CurrentConfig.InstancePath,
|
||||||
|
"LogsPath": global.CurrentConfig.LogsPath,
|
||||||
"Debug": global.CurrentConfig.Debug,
|
"Debug": global.CurrentConfig.Debug,
|
||||||
"Watchdog.Enabled": global.CurrentConfig.Watchdog.Enabled,
|
"Watchdog.Enabled": global.CurrentConfig.Watchdog.Enabled,
|
||||||
"Notification.Enabled": global.CurrentConfig.Notification.Enabled,
|
"Notification.Enabled": global.CurrentConfig.Notification.Enabled,
|
||||||
@@ -120,6 +123,10 @@ func SetSettingsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
if v, ok := value.(string); ok {
|
if v, ok := value.(string); ok {
|
||||||
global.CurrentConfig.InstancePath = v
|
global.CurrentConfig.InstancePath = v
|
||||||
}
|
}
|
||||||
|
case "LogsPath":
|
||||||
|
if v, ok := value.(string); ok {
|
||||||
|
global.CurrentConfig.LogsPath = v
|
||||||
|
}
|
||||||
case "Debug":
|
case "Debug":
|
||||||
if v, ok := value.(bool); ok {
|
if v, ok := value.(bool); ok {
|
||||||
global.CurrentConfig.Debug = v
|
global.CurrentConfig.Debug = v
|
||||||
|
|||||||
Reference in New Issue
Block a user