goshorly/routes/gethome.go
Phil d1295c10bc
Some checks failed
ci/woodpecker/push/0-pre Pipeline was successful
ci/woodpecker/push/10-build-main Pipeline was successful
ci/woodpecker/pr/10-build-main unknown status
ci/woodpecker/pr/0-pre Pipeline failed
Changed ldflags and Dockerfile from args to env
2025-04-06 20:43:46 +02:00

19 lines
506 B
Go

package routes
import (
"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_SHA": utils.CI_COMMIT_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(),
})
}