This commit is contained in:
emile 2015-09-22 10:33:37 +02:00
parent d8e8815ad1
commit 2d956da3e1
8 changed files with 474 additions and 17 deletions

4
web.go
View file

@ -22,7 +22,7 @@ func (provider *WebProvider) Provide(configurationChan chan<- *Configuration) {
systemRouter.Methods("GET").Path("/").Handler(http.HandlerFunc(GetHtmlConfigHandler))
systemRouter.Methods("GET").Path("/health").Handler(http.HandlerFunc(GetHealthHandler))
systemRouter.Methods("GET").Path("/api").Handler(http.HandlerFunc(GetConfigHandler))
systemRouter.Methods("POST").Path("/api").Handler(http.HandlerFunc(
systemRouter.Methods("PUT").Path("/api").Handler(http.HandlerFunc(
func(rw http.ResponseWriter, r *http.Request) {
configuration := new(Configuration)
b, _ := ioutil.ReadAll(r.Body)
@ -109,4 +109,4 @@ func GetServerHandler(rw http.ResponseWriter, r *http.Request) {
}else{
http.NotFound(rw, r)
}
}
}