mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-01 07:35:57 +09:00
Respect order when userIds specified
This commit is contained in:
parent
52cffe0864
commit
4f1409601e
@ -80,7 +80,13 @@ export default define(meta, async (ps, me) => {
|
|||||||
isSuspended: false
|
isSuspended: false
|
||||||
});
|
});
|
||||||
|
|
||||||
return await Promise.all(users.map(u => Users.pack(u, me, {
|
// リクエストされた通りに並べ替え
|
||||||
|
const _users = [];
|
||||||
|
for (const id of ps.userIds) {
|
||||||
|
_users.push(users.find(x => x.id === id));
|
||||||
|
}
|
||||||
|
|
||||||
|
return await Promise.all(_users.map(u => Users.pack(u, me, {
|
||||||
detail: true
|
detail: true
|
||||||
})));
|
})));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user