orangesite/hn/handlers.go
sneak c61227293e
Some checks failed
continuous-integration/drone/push Build is failing
progress
2020-03-24 17:49:19 -07:00

24 lines
448 B
Go

package hn
import (
"net/http"
"time"
"github.com/flosch/pongo2"
"github.com/labstack/echo"
)
func indexHandler(c echo.Context) error {
tc := pongo2.Context{
"time": time.Now().UTC().Format(time.RFC3339Nano),
}
return c.Render(http.StatusOK, "index.html", tc)
}
func aboutHandler(c echo.Context) error {
tc := pongo2.Context{
"time": time.Now().UTC().Format(time.RFC3339Nano),
}
return c.Render(http.StatusOK, "about.html", tc)
}