mailerlite / mailerlite-go

Go SDK for MailerLite
MIT License
5 stars 4 forks source link

Remove response body from subscriber delete #19

Closed sarajuhosova closed 1 year ago

sarajuhosova commented 1 year ago

Running Subscribers.Delete successfully deleted the entry but threw an error.

The issue was cause by Line 203 in client.go, because we were feeding the rootSubscriber into the Do function (and thus it not being nil). According to the MailerLite Docs, the DELETE operation shouldn't have a request / response body, so I decided to fix the issue by removing them from the Delete function itself.

Additionally, I've fixed the test to catch this behaviour.

robgordon89 commented 1 year ago

thankyou 👍