Continue migration to echo
This commit is contained in:
@ -13,6 +13,7 @@ import (
|
||||
"git.javil.eu/jacob1123/budgeteer/postgres"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
)
|
||||
|
||||
// Handler handles incoming requests.
|
||||
@ -36,7 +37,10 @@ func (h *Handler) Serve() {
|
||||
// LoadRoutes initializes all the routes.
|
||||
func (h *Handler) LoadRoutes(router *echo.Echo) {
|
||||
router.Use(enableCachingForStaticFiles())
|
||||
router.Use(h.ServeStatic)
|
||||
router.Use(middleware.StaticWithConfig(middleware.StaticConfig{
|
||||
Filesystem: h.StaticFS,
|
||||
HTML5: true,
|
||||
}))
|
||||
|
||||
api := router.Group("/api/v1")
|
||||
|
||||
|
Reference in New Issue
Block a user