saasitone/controllers/login.go
2021-12-03 16:44:04 -05:00

26 lines
417 B
Go

package controllers
import (
"goweb/msg"
"github.com/labstack/echo/v4"
)
type Login struct {
Controller
}
func (l *Login) Get(c echo.Context) error {
p := NewPage(c)
p.Layout = "auth"
p.Name = "login"
p.Title = "Log in"
p.Data = "This is the login page"
return l.RenderPage(c, p)
}
func (l *Login) Post(c echo.Context) error {
msg.Danger(c, "Invalid credentials. Please try again.")
return l.Get(c)
}