Initial commit of auth package.

This commit is contained in:
mikestefanello 2021-12-11 23:17:12 -05:00
parent 5582bb6acd
commit 25e5119dd5
5 changed files with 99 additions and 9 deletions

View file

@ -1,6 +1,8 @@
package controllers
import (
"goweb/auth"
"github.com/labstack/echo/v4"
)
@ -16,5 +18,8 @@ func (h *Home) Get(c echo.Context) error {
p.Metatags.Description = "Welcome to the homepage."
p.Metatags.Keywords = []string{"Go", "MVC", "Web", "Software"}
uid, _ := auth.GetUserID(c)
c.Logger().Infof("logged in user ID: %d", uid)
return h.RenderPage(c, p)
}