diff --git a/handlers/settings.go b/handlers/settings.go index aaf2ea9..5004cef 100644 --- a/handlers/settings.go +++ b/handlers/settings.go @@ -33,6 +33,8 @@ func GetSettingsHandler(w http.ResponseWriter, r *http.Request) { value = global.CurrentConfig.FrpcPath case "InstancePath": value = global.CurrentConfig.InstancePath + case "LogsPath": + value = global.CurrentConfig.LogsPath case "Debug": value = global.CurrentConfig.Debug case "Watchdog.Enabled": @@ -64,6 +66,7 @@ func GetSettingsHandler(w http.ResponseWriter, r *http.Request) { "ListenPort": global.CurrentConfig.ListenPort, "FrpcPath": global.CurrentConfig.FrpcPath, "InstancePath": global.CurrentConfig.InstancePath, + "LogsPath": global.CurrentConfig.LogsPath, "Debug": global.CurrentConfig.Debug, "Watchdog.Enabled": global.CurrentConfig.Watchdog.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 { global.CurrentConfig.InstancePath = v } + case "LogsPath": + if v, ok := value.(string); ok { + global.CurrentConfig.LogsPath = v + } case "Debug": if v, ok := value.(bool); ok { global.CurrentConfig.Debug = v