diff options
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index a4eda03..2be8d8e 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -588,43 +588,3 @@ func searchHandler(res http.ResponseWriter, req *http.Request) { res.Header().Set("Content-Type", "text/html") res.Write(adminView) } - -// func staticAssetHandler(res http.ResponseWriter, req *http.Request) { -// path := req.URL.Path -// pathParts := strings.Split(path, "/")[1:] -// pwd, err := os.Getwd() -// if err != nil { -// log.Fatal("Coudln't get current directory to set static asset source.") -// } - -// var filePathParts = []string{} -// filePathParts = append(filePathParts, pwd) -// filePathParts = append(filePathParts, "cmd") -// filePathParts = append(filePathParts, "ponzu") -// filePathParts = append(filePathParts, "vendor") -// filePathParts = append(filePathParts, "github.com") -// filePathParts = append(filePathParts, "bosssauce") -// filePathParts = append(filePathParts, "ponzu") -// filePathParts = append(filePathParts, "system") -// filePathParts = append(filePathParts, pathParts...) - -// fmt.Println(filepath.Join(filePathParts...)) - -// http.ServeFile(res, req, filepath.Join(filePathParts...)) -// } - -// func staticUploadHandler(res http.ResponseWriter, req *http.Request) { -// path := req.URL.Path -// pathParts := strings.Split(path, "/")[2:] - -// pwd, err := os.Getwd() -// if err != nil { -// log.Fatal("Coudln't get current directory to set static asset source.") -// } - -// filePathParts := make([]string, len(pathParts)+1, len(pathParts)+1) -// filePathParts = append(filePathParts, pwd) -// filePathParts = append(filePathParts, pathParts...) - -// http.ServeFile(res, req, filepath.Join(filePathParts...)) -// } |