Skip to content

Commit

Permalink
core: fix showDisplayName
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe committed May 10, 2024
1 parent b8f616e commit 35244cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/hydrooj/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "4.12.1",
"version": "4.12.2",
"bin": "bin/hydrooj.js",
"main": "src/plugin-api",
"module": "src/plugin-api",
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrooj/src/model/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class UserModel {
const [udocs, vudocs, dudocs] = await Promise.all([
UserModel.getMulti({ _id: { $in: uids } }, ['_id', 'uname', 'mail', 'avatar', 'school', 'studentId']).toArray(),
collV.find({ _id: { $in: uids } }).toArray(),
domain.getDomainUserMulti(domainId, uids).project({ uid: true, displayName: showDisplayName }).toArray(),
domain.getDomainUserMulti(domainId, uids).project({ uid: 1, ...(showDisplayName ? { displayName: 1 } : {}) }).toArray(),
]);
const udict = {};
for (const udoc of udocs) udict[udoc._id] = udoc;
Expand Down

0 comments on commit 35244cd

Please sign in to comment.