mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-30 01:25:30 +00:00
orte provider
This commit is contained in:
@@ -7,6 +7,13 @@ import (
|
||||
|
||||
func GetPlace(kgpz *xmlmodels.Library) fiber.Handler {
|
||||
return func(c *fiber.Ctx) error {
|
||||
return c.Render("/ort/", nil)
|
||||
placeID := c.Params("place")
|
||||
place := kgpz.Places.Item(placeID)
|
||||
|
||||
if place == nil {
|
||||
return c.SendStatus(fiber.StatusNotFound)
|
||||
}
|
||||
|
||||
return c.Render("/ort/", fiber.Map{"place": place})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user