MCPcopy
hub / github.com/apache/answer / CallCaptcha

Function CallCaptcha

plugin/captcha.go:42–57  ·  view source on GitHub ↗
(fn func(fn Captcha) error)

Source from the content-addressed store, hash-verified

40)
41
42func CallCaptcha(fn func(fn Captcha) error) error {
43 slugName := ""
44 _ = callCaptcha(func(captcha Captcha) error {
45 slugName = captcha.Info().SlugName
46 return nil
47 })
48 if slugName == "" {
49 return nil
50 }
51 return callCaptcha(func(captcha Captcha) error {
52 if captcha.Info().SlugName == slugName {
53 return fn(captcha)
54 }
55 return nil
56 })
57}
58
59func CaptchaEnabled() (enabled bool) {
60 _ = callCaptcha(func(fn Captcha) error {

Callers 3

GetCaptchaConfigMethod · 0.92
GenerateCaptchaMethod · 0.92
VerifyCaptchaMethod · 0.92

Calls 1

InfoMethod · 0.65

Tested by

no test coverage detected