cloudflare / node-cloudflare

Node.js API for Client API
https://cloudflare.github.io/node-cloudflare/
Other
335 stars 92 forks source link

cf.zoneSettings.editAll not works as excepted #98

Closed leepood closed 3 years ago

leepood commented 3 years ago

Version: 2.9.1

zoneSettings.editAll(id, {
              ssl: { value: 'flexible' },
              always_use_https: { value: 'on' },
})
.then(resp => console.log(resp))
.catch(err => console.log(err))

Show Error

code: 1004, message: Missing 'items'
terinjokes commented 3 years ago

I believe you need to call it with an array of setting objects.

zoneSettings.editAll(id, {
  items: [
    {id: "ssl", value: "flexible"},
    {id: "always_use_https", value: "on"}
  ]
})
leepood commented 3 years ago

I believe you need to call it with an array of setting objects.

zoneSettings.editAll(id, {
  items: [
    {id: "ssl", value: "flexible"},
    {id: "always_use_https", value: "on"}
  ]
})

okay, thanks