vdavid / node-mautic

Node.js Mautic API with ES6+async/await
Apache License 2.0
46 stars 26 forks source link

`overwriteWithBlank` cannot be set to `false` #37

Closed wfulgenzi closed 3 months ago

wfulgenzi commented 1 year ago

Hi David,

Thank you for maintaining and making available this package. It's very helpful.

We found that in some cases for the editing contact request /PATCH /contacts/ID/edit we would like to turn off the optional overwiteWithBlank parameter. Currently this is not supported with the editContact method because it is always set to true and overrides any supplied arguments, even if one explicitly sets overwriteContact: false. See line: https://github.com/vdavid/node-mautic/blob/643567e30c26faedad0dd8915b39032e33a37c0c/MauticConnector.js#L275

I tried to create a Pull request on a new feature branch but was unable to push that to the repo to submit the PR. Please let me know if there's anything I can do for that. Thanks !

wfulgenzi commented 11 months ago

Hello @vdavid wondering if you've been able to look at this? Happy to open a PR for that, to change the order of the spread and the overwriteWithBlank: true. Cheers.

vdavid commented 11 months ago

@wfulgenzi sure, please do that! Sorry for not replying earlier, I had your message bookmarked for a while then I somehow lost track of it.