webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
286 stars 93 forks source link

`delete` method query params #55

Closed wf-d-whitely closed 2 years ago

wf-d-whitely commented 2 years ago

Query params for the delete method were getting passed as data. In the example below, observe ?live=true does not get passed to the delete request.

const Webflow = require('webflow-api');

const api = new Webflow({ token: '<access_token>' });

const removed = api.removeItem({ collectionId: '<collection_id>', itemId: '<item_id>' }, { live: true })

removed.then(x => console.log(x));
johnagan commented 2 years ago

Excellent! Thank you for your contribution @wf-d-whitely 🙇

I'll get this into the next release and bump the version @dylangarcia - thanks for the review 😎 .

johnagan commented 2 years ago

v0.7.2 is published