mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
use go templates for the web pages
This commit is contained in:
parent
ae4237e0e8
commit
20b598ee3b
|
@ -69,7 +69,6 @@ func (app *application) commandsRoute(w http.ResponseWriter, r *http.Request, _
|
|||
}
|
||||
|
||||
type homeRouteData struct {
|
||||
Name string
|
||||
Channels []*data.Channel
|
||||
}
|
||||
|
||||
|
@ -87,7 +86,7 @@ func (app *application) homeRoute(w http.ResponseWriter, r *http.Request, _ http
|
|||
}
|
||||
app.Log.Infow("All channels:",
|
||||
"channel", allChannel)
|
||||
data := &homeRouteData{name, allChannel}
|
||||
data := &homeRouteData{allChannel}
|
||||
|
||||
err = t.Execute(w, data)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue