fix: auther cast
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
6c7d096166
commit
522f863c6d
11
http/http.go
11
http/http.go
@ -46,10 +46,13 @@ func (e *Env) getHandlers() (http.Handler, http.Handler) {
|
||||
}
|
||||
|
||||
if e.Settings.AuthMethod == auth.MethodJSONAuth {
|
||||
auther := e.Auther.(auth.JSONAuth)
|
||||
data["ReCaptcha"] = auther.ReCaptcha.Key != "" && auther.ReCaptcha.Secret != ""
|
||||
data["ReCaptchaHost"] = auther.ReCaptcha.Host
|
||||
data["ReCaptchaKey"] = auther.ReCaptcha.Key
|
||||
auther := e.Auther.(*auth.JSONAuth)
|
||||
|
||||
if auther.ReCaptcha != nil {
|
||||
data["ReCaptcha"] = auther.ReCaptcha.Key != "" && auther.ReCaptcha.Secret != ""
|
||||
data["ReCaptchaHost"] = auther.ReCaptcha.Host
|
||||
data["ReCaptchaKey"] = auther.ReCaptcha.Key
|
||||
}
|
||||
}
|
||||
|
||||
index := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user