mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fullStatus
This commit is contained in:
1 parent
5153a7a871
commit
b2fe14ffe7
5 files changed
+23
-41
No files matched your search
@@ -202,23 +202,6 @@ class RecordModel {
|
||||
return r;
|
||||
}
|
||||
|
||||
@ArgMethod
|
||||
static getUserInProblemMulti(domainId: string, uid: number, pid: ExternalProblemId | number, contestInfo?: ContestInfo) {
|
||||
let pdomain = domainId;
|
||||
if (typeof pid === 'string') {
|
||||
pdomain = pid.split(':')[0];
|
||||
pid = +pid.split(':')[1];
|
||||
}
|
||||
if (!contestInfo) {
|
||||
return RecordModel.coll.find({
|
||||
domainId, uid, pdomain, pid, contest: null,
|
||||
});
|
||||
}
|
||||
return RecordModel.coll.find({
|
||||
domainId, uid, pdomain, pid, contest: contestInfo,
|
||||
});
|
||||
}
|
||||
|
||||
@ArgMethod
|
||||
static getByUid(domainId: string, uid: number, limit: number): Promise<RecordDoc[]> {
|
||||
return RecordModel.coll.find({ domainId, uid, hidden: false }).sort({ _id: -1 }).limit(limit).toArray();
|
||||
|
||||
Reference in new issue
Block a user