From 78fd4ddd453b6b7d18b2b60db0ba5a7ad1b590ec Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 12 Sep 2016 16:41:58 -0700 Subject: [PATCH] Send version header, ignore thread/message PUT responses --- src/flux/nylas-api-request.es6 | 2 ++ src/flux/tasks/change-mail-task.es6 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/flux/nylas-api-request.es6 b/src/flux/nylas-api-request.es6 index da25da122..d1bd52a6a 100644 --- a/src/flux/nylas-api-request.es6 +++ b/src/flux/nylas-api-request.es6 @@ -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) { diff --git a/src/flux/tasks/change-mail-task.es6 b/src/flux/tasks/change-mail-task.es6 index 6fd98d360..f574d49f0 100644 --- a/src/flux/tasks/change-mail-task.es6 +++ b/src/flux/tasks/change-mail-task.es6 @@ -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;