This commit is contained in:
parent
21e4c434fd
commit
72c6dd6982
12 changed files with 695 additions and 48 deletions
|
@ -106,19 +106,19 @@ func New(cfg *config.Config, database *db.Database, version string) *Admin {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
||||
// Create a clone of the base template
|
||||
t, err := baseTemplate.Clone()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
||||
// Parse the template content
|
||||
t, err = t.Parse(string(content))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
||||
templates[tf] = t
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ func (a *Admin) handleLogout(w http.ResponseWriter, r *http.Request) {
|
|||
http.Redirect(w, r, "/admin/login", http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
session.Values = make(map[interface{}]interface{})
|
||||
session.Options.MaxAge = -1 // Delete session
|
||||
err = session.Save(r, w)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue