No need to return args as part of task.get

This reverts commit 831e22b4ff.
This reverts commit 6774514bd2.
This commit is contained in:
Girish Ramakrishnan
2019-12-06 08:40:16 -08:00
parent 2ffb32ae60
commit ffeb484a10
4 changed files with 14 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ function get(req, res, next) {
tasks.get(req.params.taskId, function (error, task) {
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, task));
next(new HttpSuccess(200, tasks.removePrivateFields(task)));
});
}
@@ -47,6 +47,8 @@ function list(req, res, next) {
tasks.listByTypePaged(req.query.type || null, page, perPage, function (error, result) {
if (error) return next(BoxError.toHttpError(error));
result = result.map(tasks.removePrivateFields);
next(new HttpSuccess(200, { tasks: result }));
});
}