diff --git a/backend/main.go b/backend/main.go index 8e35220..7dbbcb6 100644 --- a/backend/main.go +++ b/backend/main.go @@ -179,8 +179,8 @@ func init() { }} } -// Handler serves all backend /api call -func Handler(w http.ResponseWriter, r *http.Request) { +// APIHandler serves all backend /api call +func APIHandler(w http.ResponseWriter, r *http.Request) { if r.URL.Path[0] != '/' { r.URL.Path = "/" + r.URL.Path } diff --git a/main.go b/main.go index b71d300..0ef92a5 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ func main() { os.Exit(line()) } - http.HandleFunc("/api/", backend.Handler) + http.HandleFunc("/api/", backend.APIHandler) http.HandleFunc("/file/", backend.FileHandler) http.HandleFunc("/upload", backend.UploadHandler)