mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 05:02:40 +08:00
Switching stream to use action summaries function.
This commit is contained in:
@@ -14,7 +14,7 @@ router.get('/', (req, res, next) => {
|
||||
return Promise.all([
|
||||
comments,
|
||||
User.findByIdArray(comments.map((comment) => comment.author_id)),
|
||||
Action.findByItemIdArray(comments.map((comment) => comment.id))
|
||||
Action.getActionSummaries(comments.map((comment) => comment.id))
|
||||
]);
|
||||
}).then(([comments, users, actions]) => {
|
||||
res.json([...comments, ...users, ...actions]);
|
||||
|
||||
Reference in New Issue
Block a user