Routes and show controller functions for login and logout
This commit is contained in:
parent
5a9ee796f8
commit
187d10ca4a
@ -26,3 +26,11 @@ func (getController *GetController) ShowHome(w http.ResponseWriter, r *http.Requ
|
||||
func (getController *GetController) ShowRegister(w http.ResponseWriter, r *http.Request) {
|
||||
templating.RenderTemplate(getController.App, w, "templates/pages/register.html", nil)
|
||||
}
|
||||
|
||||
func (getController *GetController) ShowLogin(w http.ResponseWriter, r *http.Request) {
|
||||
templating.RenderTemplate(getController.App, w, "templates/pages/login.html", nil)
|
||||
}
|
||||
|
||||
func (getController *GetController) Logout(w http.ResponseWriter, r *http.Request) {
|
||||
templating.RenderTemplate(getController.App, w, "templates/pages/register.html", nil)
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ func GetRoutes(app *app.App) {
|
||||
|
||||
// Pages
|
||||
http.HandleFunc("/", getController.ShowHome)
|
||||
http.HandleFunc("/login", getController.ShowLogin)
|
||||
http.HandleFunc("/register", getController.ShowRegister)
|
||||
http.HandleFunc("/logout", getController.Logout)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user