Add help page explaining how to create a new quiz
This commit is contained in:
@@ -56,6 +56,10 @@ func (app *application) home(w http.ResponseWriter, r *http.Request, formData ho
|
||||
app.render(w, r, "home.page.tmpl.html", td)
|
||||
}
|
||||
|
||||
func (app *application) help(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
|
||||
app.render(w, r, "help.page.tmpl.html", nil)
|
||||
}
|
||||
|
||||
func (app *application) play(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
app.clientError(w, http.StatusBadRequest)
|
||||
|
||||
@@ -111,6 +111,7 @@ func main() {
|
||||
mux.GET("/template", app.downloadTemplate)
|
||||
mux.POST("/game", app.createGame)
|
||||
mux.GET("/quiz/:gameUid", app.showGame)
|
||||
mux.GET("/help", app.help)
|
||||
|
||||
mux.GET("/ws/:playerUid", app.processWebSocket)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user