This commit is contained in:
nemunaire 2020-03-08 01:06:44 +01:00
parent f073e69417
commit 0a79763f69
17 changed files with 460 additions and 159 deletions

View file

@ -28,6 +28,20 @@ func init() {
w.Write(data)
}
})
Router().GET("/surveys", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
if data, err := Asset("htdocs/index.html"); err != nil {
fmt.Fprintf(w, "{\"errmsg\":%q}", err)
} else {
w.Write(data)
}
})
Router().GET("/surveys/*_", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
if data, err := Asset("htdocs/index.html"); err != nil {
fmt.Fprintf(w, "{\"errmsg\":%q}", err)
} else {
w.Write(data)
}
})
Router().GET("/css/*_", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
w.Header().Set("Content-Type", "text/css")
if data, err := Asset(path.Join("htdocs", r.URL.Path)); err != nil {