GV14982 / async-airtable

A lightweight npm package to handle working with the Airtable API.
https://www.npmjs.com/package/asyncairtable
MIT License
53 stars 5 forks source link

🎨 Change the structure of the records you pass into create and update methods #29

Closed GV14982 closed 4 years ago

GV14982 commented 4 years ago

Currently the structure of the data you pass into:

nvm about the create functions. Just leave those as is

Is structured as:

{
  id: id // Only required for the update methods
  field1: value1,
  field2: value2
}

And this could cause an issue if the table has a column called id. So we should change the update and bulkUpdate methods to use the following:

{
  id: id,
  fields: {
    ...fields
  }
}

Be sure to update all relevant tests and documentation.