mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
refactored publicCreate
This commit is contained in:
@@ -34,12 +34,14 @@ describe('graph.queries.asset', () => {
|
||||
username: 'usernameC',
|
||||
},
|
||||
]);
|
||||
comments = await CommentsService.publicCreate(
|
||||
[0, 0, 1, 1].map(idx => ({
|
||||
author_id: users[idx].id,
|
||||
asset_id: assets[idx].id,
|
||||
body: `hello there! ${String(Math.random()).slice(2)}`,
|
||||
}))
|
||||
comments = await Promise.all(
|
||||
[0, 0, 1, 1].map(idx =>
|
||||
CommentsService.publicCreate({
|
||||
author_id: users[idx].id,
|
||||
asset_id: assets[idx].id,
|
||||
body: `hello there! ${String(Math.random()).slice(2)}`,
|
||||
})
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user