🍱 revert unnecessary code

This commit is contained in:
Max Lerebourg
2025-09-01 12:28:50 +02:00
parent b945a95f95
commit 8716f39270
2 changed files with 5 additions and 6 deletions

View File

@@ -232,7 +232,6 @@ func New(_ context.Context, next http.Handler, config *configuration.Config, nam
)
config.CaptchaSiteKey, _ = configuration.GetVariable(config, "CaptchaSiteKey")
config.CaptchaSecretKey, _ = configuration.GetVariable(config, "CaptchaSecretKey")
err = bouncer.captchaClient.New(
log,
bouncer.cacheClient,

View File

@@ -28,8 +28,8 @@ type Client struct {
infoProvider *InfoProvider
}
// InfoProvider Information for self-hosted provider.
type InfoProvider struct {
// Information for self-hosted provider.
type infoProvider struct {
js string
key string
response string
@@ -37,7 +37,7 @@ type InfoProvider struct {
}
//nolint:gochecknoglobals
var infoProviders = map[string]*InfoProvider{
var infoProviders = map[string]*infoProvider{
configuration.HcaptchaProvider: {
js: "https://hcaptcha.com/1/api.js",
key: "h-captcha",
@@ -64,9 +64,9 @@ func (c *Client) New(log *logger.Log, cacheClient *cache.Client, httpClient *htt
if !c.Valid {
return nil
}
var infoProvider *InfoProvider
var infoProvider *infoProvider
if provider == configuration.CustomProvider {
infoProvider = &InfoProvider{js: js, key: key, response: response, validate: validate}
infoProvider = &infoProvider{js: js, key: key, response: response, validate: validate}
} else {
infoProvider = infoProviders[provider]
}