From 5d15f2be8bb7ace0aaf460f93204c5fdde2ae9ec Mon Sep 17 00:00:00 2001 From: medcl Date: Sat, 16 Sep 2023 17:42:38 +0800 Subject: [PATCH] cleanup app config --- config/config.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/config/config.go b/config/config.go index a3cfb9a2..43a3aabb 100644 --- a/config/config.go +++ b/config/config.go @@ -3,22 +3,12 @@ package config import "infini.sh/framework/core/config" type AppConfig struct { + config.APIConfig UI UIConfig `config:"ui"` - Network config.NetworkConfig `config:"network"` - TLSConfig config.TLSConfig `config:"tls"` } type UIConfig struct { - Enabled bool `config:"enabled"` LocalPath string `config:"path"` LocalEnabled bool `config:"local"` VFSEnabled bool `config:"vfs"` - APIEndpoint string `config:"api_endpoint"` -} - -func (config *AppConfig) GetSchema() string { - if config.TLSConfig.TLSEnabled { - return "https" - } - return "http" }