Send version header, ignore thread/message PUT responses

This commit is contained in:
Ben Gotow 2016-09-12 16:41:58 -07:00
parent 90e7cfd2e7
commit 78fd4ddd45
2 changed files with 3 additions and 1 deletions

View file

@ -17,10 +17,12 @@ export default class NylasAPIRequest {
started: () => {},
error: () => {},
success: () => {},
headers: {},
}
this.api = api;
this.options = Object.assign(defaults, options);
this.options.headers['Api-Version'] = '2016-08-09';
const bodyIsRequired = (this.options.method !== 'GET' && !this.options.formData);
if (bodyIsRequired) {

View file

@ -255,7 +255,7 @@ export default class ChangeMailTask extends Task {
accountId: model.accountId,
method: 'PUT',
body: this.requestBodyForModel(model),
returnsModel: true,
returnsModel: false,
beforeProcessing: (body) => {
this._removeLock(model);
return body;