Initial commit of auth package.
This commit is contained in:
parent
5582bb6acd
commit
25e5119dd5
5 changed files with 99 additions and 9 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue