update file structure [ci skip]

This commit is contained in:
Henrique Dias
2016-03-06 19:18:46 +00:00
parent ddcaccda0c
commit 3f36200862
23 changed files with 180 additions and 165 deletions

18
routes/git/git.go Normal file
View File

@@ -0,0 +1,18 @@
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:
return http.StatusMethodNotAllowed, errors.New("Invalid method.")
}
}