Initial refactor of settings.

Signed-off-by: Odyssey <odyssey346@disroot.org>
This commit is contained in:
Odyssey
2022-08-14 21:06:00 +02:00
parent f0a1883db9
commit 4a6b4a82a7
13 changed files with 641 additions and 59 deletions

View File

@ -7,18 +7,18 @@ import (
"github.com/kataras/hcaptcha"
"fmt"
"os"
"io"
"net/url"
"github.com/ProjectSegfault/segfautils/config"
"github.com/ProjectSegfault/segfautils/utils"
)
var (
siteKey = os.Getenv("HCAPTCHA_SITE_KEY")
secretKey = os.Getenv("HCAPTCHA_SECRET_KEY")
webhookURL = os.Getenv("SEGFAUTILS_WEBHOOK_URL")
siteKey = config.HCaptchaSiteKey()
secretKey = config.HCaptchaSecretKey()
webhookURL = config.WebhookURL()
client = hcaptcha.New(secretKey) /* See `Client.FailureHandler` too. */
)