From 7449b558e3322558c56ed520f39f65d0db9211bd Mon Sep 17 00:00:00 2001 From: Kevin Curtin Date: Wed, 19 Sep 2018 13:36:21 -0600 Subject: [PATCH] Update job_ignore to accept a reason Also removes dup `job_ignore` function --- lib/response.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/response.js b/lib/response.js index b342a38..d0e8c1b 100644 --- a/lib/response.js +++ b/lib/response.js @@ -58,16 +58,10 @@ Response = (function () { this._attachments.push(...attachments) this.meta('set_job_attachments', JSON.stringify(this._attachments)) } - Response.prototype.job_ignore = function (status, data) { - this.meta('set_job_status', 'ignored') - this.meta('set_job_status_message', status) - if (data) { - this._respond(data) - } - } - Response.prototype.job_ignore = function (status, data) { + Response.prototype.job_ignore = function (status, reason, data) { this.meta('set_job_status', 'ignored') this.meta('set_job_status_message', status) + this.meta('set_job_failure_message', reason) if (data) { this._respond(data) }