Skip to content

Commit 1259d4f

Browse files
Prashanth Sadasivandboskovic
authored andcommitted
remove type restriction for job attach method
1 parent aeef68b commit 1259d4f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/response.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,10 @@ Response = (function () {
4646
}
4747
Response.prototype.job_attach = function (...attachments) {
4848
const requiredLabels = [ 'type', 'label', 'value' ]
49-
const allowedTypes = [ 'link', 'password' ]
5049
for (const attachment of attachments) {
5150
if (!~requiredLabels.every(l => ~Object.keys(attachment).indexOf(l))) {
5251
throw new Error(`Attachment requires mandatory properties ${requiredLabels.join(', ')}`)
5352
}
54-
if (!~allowedTypes.indexOf(attachment.type)) {
55-
throw new Error(`Attachment must be of one of the following types ${allowedTypes.join(', ')}`)
56-
}
5753
}
5854
this._attachments.push(...attachments)
5955
this.meta('set_job_attachments', JSON.stringify(this._attachments))

0 commit comments

Comments
 (0)