jira-connector
Advanced tools
Comparing version 2.15.2 to 2.15.3
@@ -74,4 +74,4 @@ export declare class Issue { | ||
headers?: { | ||
'X-Atlassian-Token': any, | ||
charset: string | any, | ||
'X-Atlassian-Token'?: string, | ||
charset?: string, | ||
[key: string]: any | ||
@@ -78,0 +78,0 @@ } |
@@ -887,3 +887,3 @@ "use strict"; | ||
var options = { | ||
uri: this.jiraClient.buildURL('issue/' + opts.issueId || opts.issueKey + '/worklog'), | ||
uri: this.jiraClient.buildURL('/issue/' + (opts.issueId || opts.issueKey) + '/worklog'), | ||
method: 'POST', | ||
@@ -930,3 +930,3 @@ json: true, | ||
var options = { | ||
uri: this.jiraClient.buildURL('issue/' + opts.issueId || opts.issueKey + '/worklog/' + opts.id || opts.worklogId), | ||
uri: this.jiraClient.buildURL('/issue/' + (opts.issueId || opts.issueKey) + '/worklog/' + (opts.id || opts.worklogId)), | ||
method: 'GET', | ||
@@ -967,3 +967,3 @@ json: true, | ||
var options = { | ||
uri: this.jiraClient.buildURL('issue/' + opts.issueId || opts.issueKey + '/worklog/' + opts.id || opts.worklogId), | ||
uri: this.jiraClient.buildURL('/issue/' + (opts.issueId || opts.issueKey) + '/worklog/' + (opts.id || opts.worklogId)), | ||
method: 'PUT', | ||
@@ -1019,3 +1019,3 @@ json: true, | ||
var options = { | ||
uri: this.jiraClient.buildURL('issue/' + opts.issueId || opts.issueKey + '/worklog/' + opts.id || opts.worklogId), | ||
uri: this.jiraClient.buildURL('/issue/' + (opts.issueId || opts.issueKey) + '/worklog/' + (opts.id || opts.worklogId)), | ||
method: 'DELETE', | ||
@@ -1051,3 +1051,4 @@ json: true, | ||
this.addAttachment = function (opts, callback) { | ||
var attachments = opts.filename.map(function (filePath) { | ||
var filename = Array.isArray(opts.filename) ? opts.filename : [opts.filename]; | ||
var attachments = filename.map(function (filePath) { | ||
var filename = filePath.split('/').reverse()[0]; | ||
@@ -1064,8 +1065,13 @@ var mimeType = mime.lookup(filename); | ||
var headers = { | ||
charset: 'utf-8', | ||
'X-Atlassian-Token': 'nocheck' | ||
} | ||
var options = { | ||
uri: this.jiraClient.buildURL('issue/' + opts.issueId || opts.issueKey + '/attachments'), | ||
uri: this.jiraClient.buildURL('/issue/' + (opts.issueId || opts.issueKey) + '/attachments'), | ||
method: 'POST', | ||
json: true, | ||
followAllRedirects: true, | ||
headers: Object.assign({ charset: 'utf-8' }, opts.headers || {}), | ||
headers: Object.assign(headers, opts.headers || {}), | ||
formData: { | ||
@@ -1072,0 +1078,0 @@ file: attachments |
{ | ||
"name": "jira-connector", | ||
"version": "2.15.2", | ||
"version": "2.15.3", | ||
"description": "Easy to use NodeJS wrapper for the Jira REST API.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
382782
8333