handle browser back button with nav link
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type ProjectHandler struct {
|
||||
Templates *template.Template
|
||||
Templates *template.Template
|
||||
ProjectStore *store.SQLiteProjectStore
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ func (h *ProjectHandler) Render(w http.ResponseWriter, tmpl string, data interfa
|
||||
|
||||
func NewProjectHandler(db *sql.DB) *ProjectHandler {
|
||||
return &ProjectHandler{
|
||||
Templates: template.Must(template.ParseGlob("views/*.html")),
|
||||
Templates: template.Must(template.ParseGlob("views/*.html")),
|
||||
ProjectStore: store.NewSQLiteProjectStore(db),
|
||||
}
|
||||
}
|
||||
@@ -41,4 +41,4 @@ func (h *ProjectHandler) ProjectsPage(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
h.Render(w, "projects", projects)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user