mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Respect order when userIds specified
This commit is contained in:
parent
e380df34df
commit
d3631b3342
1 changed files with 7 additions and 1 deletions
|
@ -80,7 +80,13 @@ export default define(meta, async (ps, me) => {
|
|||
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
|
||||
})));
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue