mirror of
https://github.com/wassname/talk.git
synced 2026-07-14 11:18:50 +08:00
Simplify concat.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user