This commit is contained in:
undefined committed 2022-05-02 16:38:42 +08:00
1 parent 7ddd2077e7
commit 3d2384f31a
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.11.21",
"version": "3.11.22",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1 -1
View File
@@ -384,7 +384,7 @@ class UserModel {
}
static async listGroup(domainId: string, uid?: number) {
const groups = await collGroup.find(uid ? { domainId, uids: uid } : { domainId }).toArray();
const groups = await collGroup.find(typeof uid === 'number' ? { domainId, uids: uid } : { domainId }).toArray();
if (uid) {
groups.push({
_id: new ObjectID(), domainId, uids: [uid], name: uid.toString(),