mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix #351
This commit is contained in:
1 parent
7ddd2077e7
commit
3d2384f31a
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.11.21",
|
"version": "3.11.22",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ class UserModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static async listGroup(domainId: string, uid?: number) {
|
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) {
|
if (uid) {
|
||||||
groups.push({
|
groups.push({
|
||||||
_id: new ObjectID(), domainId, uids: [uid], name: uid.toString(),
|
_id: new ObjectID(), domainId, uids: [uid], name: uid.toString(),
|
||||||
|
|||||||
Reference in new issue
Block a user