mirror of
https://github.com/cubixle/tuukoti-cli.git
synced 2026-04-24 22:54:46 +01:00
19 lines
284 B
Go
19 lines
284 B
Go
package http
|
|
|
|
import (
|
|
"github.com/labstack/echo/v4"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type HTTP struct {
|
|
log *logrus.Logger
|
|
}
|
|
|
|
func RegisterRoutes(e *echo.Echo, log *logrus.Logger) {
|
|
h := HTTP{log: log}
|
|
|
|
e.HTTPErrorHandler = h.DefaultErrorHandler
|
|
|
|
e.GET("/", h.DefaultHandler)
|
|
}
|