remove hcaptcha testing stuff from /users

This commit is contained in:
Arya 2023-07-11 20:00:45 +05:30
parent e22aa46ae7
commit 360b96b40a
Signed by untrusted user: arya
GPG Key ID: 842D12BDA50DF120

View File

@ -12,8 +12,6 @@ import (
"github.com/gofiber/fiber/v2"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"github.com/kataras/hcaptcha"
)
type Userstruct struct {
@ -38,14 +36,6 @@ type Userinfo struct {
Loc string `json:"loc"`
}
// Hcaptcha setup
var (
secretKey string = os.Getenv("PUBLAPI_HCAPTCHA_SECRET")
siteKey string = os.Getenv("PUBLAPI_HCAPTCHA_SITE")
client = hcaptcha.New(secretKey)
)
func userdata(username, usersonline, ops string) Userinfo {
regex := "(^| )" + username + "($| )"
isonline, err := regexp.MatchString(string(regex), string(usersonline))