goshorly/routes/gethome.go

20 lines
533 B
Go
Raw Permalink Normal View History

package routes
import (
2023-09-04 18:59:51 +00:00
"git.hackmi.ch/Phil/goshorly/db"
"git.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(),
})
}