2024-01-18 17:01:30 +00:00
|
|
|
package routes
|
|
|
|
|
|
|
|
import (
|
2024-03-19 20:16:26 +00:00
|
|
|
"log"
|
|
|
|
|
2024-01-18 17:01:30 +00:00
|
|
|
"git.matterlinux.xyz/Matter/website/lib"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
func DownloadRoute(c *fiber.Ctx) error{
|
|
|
|
con, err := lib.GetContent("", "download")
|
|
|
|
if err != nil {
|
2024-03-19 20:16:26 +00:00
|
|
|
log.Printf("GetContent failed: %s", err.Error())
|
2024-01-18 17:01:30 +00:00
|
|
|
return lib.RenderError(c, 500)
|
|
|
|
}
|
|
|
|
|
|
|
|
return c.Render("download", fiber.Map{
|
2024-05-05 18:22:45 +00:00
|
|
|
"content": con,
|
2024-01-18 17:01:30 +00:00
|
|
|
})
|
|
|
|
}
|