Various fixes

This commit is contained in:
Girish Ramakrishnan
2018-12-08 21:12:49 -08:00
parent 8502bf4bfa
commit 6d66eb7759

View File

@@ -50,7 +50,6 @@ function list(req, res, next) {
if (req.query.type && typeof req.query.type !== 'string') return next(new HttpError(400, 'type must be a string'));
tasks.listPaged(req.query.type || null, page, perPage, function (error, tasks) {
if (error && error.reason === TaskError.NOT_FOUND) return next(new HttpError(404, 'No such task'));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, { tasks }));