Added register route and template.

This commit is contained in:
mikestefanello 2021-12-03 16:35:11 -05:00
parent fe0fb8c801
commit fc1d3cdc33
7 changed files with 69 additions and 8 deletions

25
controllers/register.go Normal file
View file

@ -0,0 +1,25 @@
package controllers
import (
"goweb/msg"
"github.com/labstack/echo/v4"
)
type Register struct {
Controller
}
func (r *Register) Get(c echo.Context) error {
p := NewPage(c)
p.Layout = "auth"
p.Name = "register"
p.Title = "Register"
p.Data = "This is the login page"
return r.RenderPage(c, p)
}
func (r *Register) Post(c echo.Context) error {
msg.Set(c, msg.Danger, "Registration is currently disabled.")
return r.Get(c)
}