Files
lenz-web/controllers/index.go
Simon Martens 052f21e87a Index functions
2025-03-26 16:18:53 +01:00

17 lines
338 B
Go

package controllers
import (
"github.com/Theodor-Springmann-Stiftung/lenz-web/xmlmodels"
"github.com/gofiber/fiber/v2"
)
const DEFAULT_YEAR = 1765
func GetIndex(fiber *fiber.Ctx) error {
lib := xmlmodels.Get()
// Years
years, yearmap := lib.Years()
return fiber.Render("/", map[string]any{"years": years, "yearmap": yearmap})
}