Files
fnx_web/pixelapi/misc.go

17 lines
433 B
Go
Raw Normal View History

package pixelapi
2018-09-19 22:26:52 +02:00
// Recaptcha stores the reCaptcha site key
type Recaptcha struct {
SiteKey string `json:"site_key"`
}
2018-09-19 22:26:52 +02:00
// GetRecaptcha gets the reCaptcha site key from the pixelapi server. If
// reCaptcha is disabled the key will be empty
func (p *PixelAPI) GetRecaptcha() (resp Recaptcha, err error) {
err = p.jsonRequest("GET", p.apiEndpoint+"/misc/recaptcha", &resp)
if err != nil {
2018-09-19 22:26:52 +02:00
return resp, err
}
return resp, nil
}