Updated README.

This commit is contained in:
mikestefanello 2021-12-28 22:05:20 -05:00
parent 0dde8859bd
commit d46e8dee5d
2 changed files with 133 additions and 12 deletions

View file

@ -20,17 +20,17 @@ type (
)
func (c *Contact) Get(ctx echo.Context) error {
p := controller.NewPage(ctx)
p.Layout = "main"
p.Name = "contact"
p.Title = "Contact us"
p.Form = ContactForm{}
page := controller.NewPage(ctx)
page.Layout = "main"
page.Name = "contact"
page.Title = "Contact us"
page.Form = ContactForm{}
if form := ctx.Get(context.FormKey); form != nil {
p.Form = form.(*ContactForm)
page.Form = form.(*ContactForm)
}
return c.RenderPage(ctx, p)
return c.RenderPage(ctx, page)
}
func (c *Contact) Post(ctx echo.Context) error {