This commit is contained in:
lightings 2023-07-25 14:34:29 +08:00
parent a6f260a6e6
commit d0090f5709
2 changed files with 4 additions and 5 deletions

View File

@ -65,10 +65,7 @@ class UserDao {
const users = results.map((user) => { const users = results.map((user) => {
this.getUserInfo(user.account_id); this.getUserInfo(user.account_id);
return { return user.account_id;
uid: user.account_id,
name: user.name.toString(),
};
}); });
return { users: users, last_idx: results[results.length - 1].idx }; return { users: users, last_idx: results[results.length - 1].idx };

View File

@ -60,7 +60,9 @@ class FriendService {
} }
async findUser(name, last_idx, limit, uid) { async findUser(name, last_idx, limit, uid) {
return await userDao.findUser(name, last_idx, limit, uid); const result = await userDao.findUser(name, last_idx, limit, uid);
result.users = await this.uidsToUsers(uid, result.users);
return result;
} }
async uidsToUsers(uid, uids) { async uidsToUsers(uid, uids) {