remove hcaptcha testing stuff from /users
This commit is contained in:
parent
e22aa46ae7
commit
360b96b40a
@ -12,8 +12,6 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/kataras/hcaptcha"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Userstruct struct {
|
type Userstruct struct {
|
||||||
@ -38,14 +36,6 @@ type Userinfo struct {
|
|||||||
Loc string `json:"loc"`
|
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 {
|
func userdata(username, usersonline, ops string) Userinfo {
|
||||||
regex := "(^| )" + username + "($| )"
|
regex := "(^| )" + username + "($| )"
|
||||||
isonline, err := regexp.MatchString(string(regex), string(usersonline))
|
isonline, err := regexp.MatchString(string(regex), string(usersonline))
|
||||||
|
Loading…
Reference in New Issue
Block a user