get recaptcha site key from api
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package pixelapi
|
||||
|
||||
// Recaptcha stores the reCaptcha site key
|
||||
type Recaptcha struct {
|
||||
SiteKey string `json:"site_key"`
|
||||
}
|
||||
|
||||
func (p *PixelAPI) GetRecaptcha() (resp *Recaptcha, err error) {
|
||||
err = p.jsonRequest("GET", p.apiEndpoint+"/misc/recpatcha", resp)
|
||||
// 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 {
|
||||
return nil, err
|
||||
return resp, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user