diff --git a/server/ctrl/config.go b/server/ctrl/config.go index 8a958677..cedcbb1c 100644 --- a/server/ctrl/config.go +++ b/server/ctrl/config.go @@ -13,27 +13,8 @@ import ( var ( logpath = filepath.Join(GetCurrentDir(), LOG_PATH, "access.log") configpath = filepath.Join(GetCurrentDir(), CONFIG_PATH, "config.json") - pluginpath = filepath.Join(GetCurrentDir(), PLUGIN_PATH) ) -func FetchPluginsHandler(ctx App, res http.ResponseWriter, req *http.Request) { - f, err := os.OpenFile(pluginpath, os.O_RDONLY, os.ModePerm) - if err != nil { - SendErrorResult(res, err) - return - } - files, err := f.Readdir(0) - if err != nil { - SendErrorResult(res, err) - return - } - plugins := make([]string, 0) - for i := 0; i < len(files); i++ { - plugins = append(plugins, files[i].Name()) - } - SendSuccessResults(res, plugins) -} - func FetchLogHandler(ctx App, res http.ResponseWriter, req *http.Request) { file, err := os.OpenFile(logpath, os.O_RDONLY, os.ModePerm) if err != nil { diff --git a/server/ctrl/static.go b/server/ctrl/static.go index bda0b03e..e950c22d 100644 --- a/server/ctrl/static.go +++ b/server/ctrl/static.go @@ -75,42 +75,17 @@ func AboutHandler(ctx App, res http.ResponseWriter, req *http.Request) {
-{{range .Plugins}}
- {{ index . 0 }} ({{ index . 1 }})
{{end}}
-