Footer with souce code link & generation time
This commit is contained in:
parent
da0114fbcb
commit
fdc1740126
5 changed files with 61 additions and 7 deletions
|
|
@ -2,6 +2,7 @@ package middlewares
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.readonly.ch/bouzoure/popvaud-people/helpers"
|
||||
"git.readonly.ch/bouzoure/popvaud-people/models"
|
||||
|
|
@ -15,10 +16,12 @@ type TemplatesGlobals struct {
|
|||
UserEmail string
|
||||
UserFullname string
|
||||
UserIsAdmin bool
|
||||
TimeStart time.Time
|
||||
}
|
||||
|
||||
func TemplatesMiddleware(c *fiber.Ctx) error {
|
||||
globals := TemplatesGlobals{}
|
||||
globals.TimeStart = c.Context().Time()
|
||||
|
||||
sess, err := helpers.GetSessionStore(c)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue