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

View file

@ -1,6 +1,8 @@
package controllers
import (
"goweb/msg"
"github.com/labstack/echo/v4"
)
@ -17,8 +19,7 @@ func (l *Login) Get(c echo.Context) error {
return l.RenderPage(c, p)
}
//func (a *Contact) Post(c echo.Context) error {
// msg.Set(c, msg.Success, "Thank you for contacting us!")
// msg.Set(c, msg.Info, "We will respond to you shortly.")
// return a.Redirect(c, "home")
//}
func (l *Login) Post(c echo.Context) error {
msg.Set(c, msg.Danger, "Invalid credentials. Please try again.")
return l.Get(c)
}