From 07902303cc5817deccee30fcb3839d6ceda9cbfd Mon Sep 17 00:00:00 2001 From: yokowu <18836617@qq.com> Date: Thu, 9 Apr 2026 21:19:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=B3=A8=E5=86=8C=20?= =?UTF-8?q?captcha?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/bridge.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/bridge.go b/backend/bridge.go index ea39e169..41359e6f 100644 --- a/backend/bridge.go +++ b/backend/bridge.go @@ -14,6 +14,7 @@ import ( "github.com/chaitin/MonkeyCode/backend/domain" "github.com/chaitin/MonkeyCode/backend/errcode" "github.com/chaitin/MonkeyCode/backend/pkg" + "github.com/chaitin/MonkeyCode/backend/pkg/captcha" "github.com/chaitin/MonkeyCode/backend/pkg/tasker" ) @@ -84,6 +85,12 @@ func WithSiteResolver(resolver domain.SiteResolver) BridgeOption { } } +func WithCaptcha(captcha *captcha.Captcha) BridgeOption { + return func(i *do.Injector) { + do.OverrideValue(i, captcha) + } +} + func Register(e *echo.Echo, dir string, opts ...BridgeOption) error { cfg, err := config.Init(dir) if err != nil {