tasks: remove auditSource from start/stop
This commit is contained in:
@@ -23,7 +23,7 @@ function auditSource(req) {
|
||||
function stopTask(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.taskId, 'string');
|
||||
|
||||
tasks.stopTask(req.params.taskId, auditSource(req), function (error) {
|
||||
tasks.stopTask(req.params.taskId, function (error) {
|
||||
if (error && error.reason === TaskError.NOT_FOUND) return next(new HttpError(404, 'No such task'));
|
||||
if (error && error.reason === TaskError.BAD_STATE) return next(new HttpError(409, error.message));
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
Reference in New Issue
Block a user