mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-25 01:21:14 +08:00
Send version header, ignore thread/message PUT responses
This commit is contained in:
parent
90e7cfd2e7
commit
78fd4ddd45
2 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue