2023-12-09 16:25:38 +00:00
|
|
|
package routes
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
"github.com/gofiber/fiber/v2/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func IndexRoute(c *fiber.Ctx) error{
|
2023-12-09 18:38:10 +00:00
|
|
|
content, err := GetContent("content", "index")
|
2023-12-09 16:25:38 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Error(err)
|
2023-12-22 21:22:23 +00:00
|
|
|
return RenderError(c, 500)
|
2023-12-09 16:25:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return c.Render("index", fiber.Map{
|
|
|
|
"readme": content,
|
|
|
|
})
|
|
|
|
}
|