Simplify concat.

This commit is contained in:
gaba
2016-11-04 14:24:04 -07:00
parent bbe086df69
commit 69980c9d7d
+1 -1
View File
@@ -13,7 +13,7 @@ router.get('/', (req, res, next) => {
const actions = Action.findByItemIdArray(comments.map((comment) => comment.id));
Promise.all([comments, users, actions]).then(([comments, users, actions]) => {
res.json(comments.concat(users).concat(actions));
res.json(...comments,...users,...actions);
}).catch(error => {
next(error);
});