Add users and grades display
This commit is contained in:
parent
42b15a1546
commit
c9d64640e2
13 changed files with 432 additions and 17 deletions
21
static.go
21
static.go
|
@ -28,6 +28,13 @@ func init() {
|
|||
w.Write(data)
|
||||
}
|
||||
})
|
||||
Router().GET("/grades", 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)
|
||||
|
@ -42,6 +49,20 @@ func init() {
|
|||
w.Write(data)
|
||||
}
|
||||
})
|
||||
Router().GET("/users", 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("/users/*_", 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 {
|
||||
|
|
Reference in a new issue