Skip to content

Commit

Permalink
Merge pull request #3594 from punkeel/maxime/fix-turnstile-update
Browse files Browse the repository at this point in the history
Fix turnstile's UpdateTurnstileWidgetParams
  • Loading branch information
jacobbednarz authored Nov 12, 2024
2 parents 7289d6f + e69380e commit 72fcc88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/3594.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
turnstile: fix UpdateTurnstileWidgetParams (support setting values to `false`)
```
11 changes: 5 additions & 6 deletions turnstile.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ type CreateTurnstileWidgetParams struct {

type UpdateTurnstileWidgetParams struct {
SiteKey string `json:"-"`
Name string `json:"name,omitempty"`
Domains []string `json:"domains,omitempty"`
Mode string `json:"mode,omitempty"`
BotFightMode bool `json:"bot_fight_mode,omitempty"`
Region string `json:"region,omitempty"`
OffLabel bool `json:"offlabel,omitempty"`
Name *string `json:"name,omitempty"`
Domains *[]string `json:"domains,omitempty"`
Mode *string `json:"mode,omitempty"`
BotFightMode *bool `json:"bot_fight_mode,omitempty"`
OffLabel *bool `json:"offlabel,omitempty"`
}

type TurnstileWidgetResponse struct {
Expand Down

0 comments on commit 72fcc88

Please sign in to comment.