tasks: remove auditSource from start/stop

This commit is contained in:
Girish Ramakrishnan
2018-12-11 09:22:13 -08:00
parent ee609c8ef0
commit c7da090882
6 changed files with 14 additions and 20 deletions

View File

@@ -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));