add vcs command

This commit is contained in:
Henrique Dias
2016-06-26 18:30:08 +01:00
parent fff716b2b3
commit 0f18f74848
6 changed files with 140 additions and 148 deletions

View File

@@ -14,6 +14,7 @@ import (
a "github.com/hacdias/caddy-filemanager/internal/assets"
"github.com/hacdias/caddy-filemanager/internal/config"
"github.com/hacdias/caddy-filemanager/internal/file"
"github.com/hacdias/caddy-filemanager/internal/vcs"
"github.com/mholt/caddy/caddyhttp/httpserver"
)
@@ -79,7 +80,11 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
}
// Search and git commands
if r.Header.Get("Search") == "true" {
// TODO: search and git commands
// TODO: search commands
}
// VCS commands
if r.Header.Get("Command") != "" {
vcs.Handle(w, r, c)
}
// Creates a new folder
// TODO: not implemented on frontend