login page tweaks
This commit is contained in:
parent
73b7144394
commit
85a114e591
5 changed files with 26 additions and 11 deletions
|
|
@ -41,12 +41,12 @@ func (m *authMiddleware) handler(c *router.Context) {
|
|||
return
|
||||
} else {
|
||||
// TODO: show error
|
||||
c.Out.Header().Set("Content-Type", "text/html")
|
||||
assets.Render("login.html", c.Out, nil)
|
||||
c.HTML(http.StatusOK, assets.Template("login.html"), map[string]string{
|
||||
"username": username,
|
||||
"error": "Invalid username/password",
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
c.Out.Header().Set("Content-Type", "text/html")
|
||||
assets.Render("login.html", c.Out, nil)
|
||||
c.HTML(http.StatusOK, assets.Template("login.html"), nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue