github.com/navikt/knorten@v0.0.0-20240419132333-1333f46ed8b6/pkg/api/handlers/index_handlers.go (about) 1 package handlers 2 3 import ( 4 "net/http" 5 6 "github.com/navikt/knorten/pkg/api/middlewares" 7 8 "github.com/gin-gonic/gin" 9 ) 10 11 func IndexHandler(ctx *gin.Context) { 12 ctx.HTML(http.StatusOK, "index", gin.H{ 13 "loggedIn": ctx.GetBool(middlewares.LoggedInKey), 14 "isAdmin": ctx.GetBool(middlewares.AdminKey), 15 }) 16 }