website/routes/download.go

24 lines
435 B
Go
Raw Normal View History

2024-01-18 17:01:30 +00:00
package routes
import (
"git.matterlinux.xyz/Matter/website/lib"
2024-08-13 21:32:48 +00:00
"git.matterlinux.xyz/Matter/website/log"
2024-01-18 17:01:30 +00:00
"github.com/gofiber/fiber/v2"
)
2024-08-13 21:32:48 +00:00
func GET_Download(c *fiber.Ctx) error {
var (
con lib.Content
err error
)
if con, err = lib.GetContent("", "download"); err != nil {
log.Error("GetContent failed: %s", err.Error())
return lib.RenderError(c, 500)
}
2024-01-18 17:01:30 +00:00
2024-08-13 21:32:48 +00:00
return c.Render("download", fiber.Map{
"content": con,
})
2024-01-18 17:01:30 +00:00
}