2023-09-10 15:39:34 +00:00
|
|
|
package router
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
|
2023-10-04 11:36:54 +00:00
|
|
|
"git.ekzyis.com/ekzyis/delphi.market/server/router/context"
|
2023-09-10 15:39:34 +00:00
|
|
|
"git.ekzyis.com/ekzyis/delphi.market/server/router/handler"
|
|
|
|
"git.ekzyis.com/ekzyis/delphi.market/server/router/middleware"
|
|
|
|
)
|
|
|
|
|
2024-07-09 20:41:29 +00:00
|
|
|
type Context = context.Context
|
2023-10-04 11:36:54 +00:00
|
|
|
|
2024-07-09 20:41:29 +00:00
|
|
|
func Init(e *echo.Echo, sc Context) {
|
|
|
|
e.Use(middleware.Session(sc))
|
2023-10-04 11:36:54 +00:00
|
|
|
|
2024-07-09 20:41:29 +00:00
|
|
|
e.GET("/", handler.HandleIndex(sc))
|
2024-07-10 07:14:06 +00:00
|
|
|
e.GET("/about", handler.HandleAbout(sc))
|
2023-09-10 15:39:34 +00:00
|
|
|
}
|