filebrowser/routes/git/git.go

19 lines
369 B
Go
Raw Normal View History

2016-03-06 13:14:05 +00:00
package git
import (
"errors"
"net/http"
"github.com/hacdias/caddy-hugo/config"
)
// ServeHTTP is used to serve the content of GIT API.
func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error) {
switch r.Method {
case "POST":
return POST(w, r, c)
default:
2016-03-06 14:23:37 +00:00
return http.StatusMethodNotAllowed, errors.New("Invalid method.")
2016-03-06 13:14:05 +00:00
}
}