We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ff1b628 + 0790230 commit 055d75aCopy full SHA for 055d75a
1 file changed
backend/bridge.go
@@ -14,6 +14,7 @@ import (
14
"github.com/chaitin/MonkeyCode/backend/domain"
15
"github.com/chaitin/MonkeyCode/backend/errcode"
16
"github.com/chaitin/MonkeyCode/backend/pkg"
17
+ "github.com/chaitin/MonkeyCode/backend/pkg/captcha"
18
"github.com/chaitin/MonkeyCode/backend/pkg/tasker"
19
)
20
@@ -84,6 +85,12 @@ func WithSiteResolver(resolver domain.SiteResolver) BridgeOption {
84
85
}
86
87
88
+func WithCaptcha(captcha *captcha.Captcha) BridgeOption {
89
+ return func(i *do.Injector) {
90
+ do.OverrideValue(i, captcha)
91
+ }
92
+}
93
+
94
func Register(e *echo.Echo, dir string, opts ...BridgeOption) error {
95
cfg, err := config.Init(dir)
96
if err != nil {
0 commit comments