18 lines
299 B
Go
18 lines
299 B
Go
|
package captcha
|
||
|
|
||
|
import (
|
||
|
"github.com/labstack/echo/v4"
|
||
|
"github.com/ssoda/captcha"
|
||
|
)
|
||
|
|
||
|
type Handler struct{}
|
||
|
|
||
|
// NewHandler returns new Handler.
|
||
|
func NewHandler() *Handler {
|
||
|
return &Handler{}
|
||
|
}
|
||
|
|
||
|
func (h *Handler) Register(g *echo.Group) {
|
||
|
g.GET("/*", echo.WrapHandler(captcha.Server(400, 65)))
|
||
|
}
|