mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
使用 @param 验证接口
This commit is contained in:
1 parent
4e85b696c0
commit
19cf1a5304
22 files changed
+657
-393
No files matched your search
@@ -511,9 +511,11 @@ export const ContestHandlerMixin = (c) => class extends c {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
async verifyProblems(domainId: string, pids: number[]) {
|
||||
await problem.getList(domainId, pids, true);
|
||||
return pids;
|
||||
async verifyProblems(domainId: string, pids: Array<number | string>) {
|
||||
const pdict = await problem.getList(domainId, pids, true);
|
||||
const _pids: Set<number> = new Set();
|
||||
for (const i in pdict) _pids.add(pdict[i].docId);
|
||||
return Array.from(_pids);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user