Skip to content

Commit

Permalink
Fix: users/show response wrong users
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 committed Dec 27, 2023
1 parent 1233b61 commit e760e47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/server/api/endpoints/users/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ export default define(meta, async (ps, me) => {
// リクエストされた通りに並べ替え
const _users = [];
for (const id of ps.userIds) {
_users.push(users.find(x => x.id === id));
const user = users.find((u) => u.id === id);
if (user) _users.push(user);
}

return await Promise.all(_users.map(u => Users.pack(u, me, {
detail: true
})));
return await Users.packMany(_users, me, {
detail: true,
});
} else {
// Lookup user
if (typeof ps.host === 'string' && typeof ps.username === 'string') {
Expand Down

0 comments on commit e760e47

Please sign in to comment.