yoake/internal/servetpl/funcmap/auth.go

16 lines
257 B
Go
Raw Normal View History

2022-11-07 04:45:02 -06:00
package funcmap
import (
"github.com/eternal-flame-AD/yoake/internal/auth"
"github.com/labstack/echo/v4"
)
func AuthGet(c echo.Context) auth.RequestAuth {
a := auth.GetRequestAuth(c)
if !a.Valid {
return auth.RequestAuth{}
} else {
return a
}
}