delphi.market/server/router/router.go

25 lines
709 B
Go
Raw Normal View History

package router
import (
"github.com/labstack/echo/v4"
"git.ekzyis.com/ekzyis/delphi.market/server/router/context"
"git.ekzyis.com/ekzyis/delphi.market/server/router/handler"
)
2024-07-09 20:41:29 +00:00
type Context = context.Context
2024-07-09 20:41:29 +00:00
func Init(e *echo.Echo, sc Context) {
// e.Use(middleware.Session(sc))
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))
2024-07-12 11:26:27 +00:00
e.GET("/login", handler.HandleAuth(sc, "login"))
e.GET("/login/:method", handler.HandleAuth(sc, "login"))
e.GET("/signup", handler.HandleAuth(sc, "register"))
e.GET("/signup/:method", handler.HandleAuth(sc, "register"))
e.GET("/api/lnauth/callback", handler.HandleLnAuthCallback(sc))
e.GET("/session", handler.HandleSessionCheck(sc))
}