goshorly/routes/gethome.go

20 lines
537 B
Go
Raw Normal View History

package routes
import (
2022-12-23 21:50:40 +00:00
"gitea.hackmi.ch/Phil/goshorly/db"
"gitea.hackmi.ch/Phil/goshorly/utils"
"github.com/gofiber/fiber/v2"
)
func Gethome(c *fiber.Ctx) error {
return c.Render("views/home", fiber.Map{
"CI_COMMIT_SHORT_SHA": utils.CI_COMMIT_SHORT_SHA,
"CI_COMMIT_BRANCH": utils.CI_COMMIT_BRANCH,
"CI_COMMIT_TAG": utils.CI_COMMIT_TAG,
"CI_TAGGED": utils.CI_TAGGED,
"CI_BUILD": utils.CI_BUILD,
"TotalLinks": db.GetTotalLinks(),
"TotalViews": db.GetTotalViews(),
})
}