mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
fix problems found by deepscan.io
This commit is contained in:
1 parent
e8dcd97561
commit
dd4ecdb029
13 files changed
+33
-29
No files matched your search
@@ -323,8 +323,8 @@ export class ProblemPretestConnectionHandler extends ConnectionHandler {
|
||||
@param('pid', Types.String)
|
||||
async prepare(domainId: string, pid: string) {
|
||||
const pdoc = await problem.get(domainId, pid);
|
||||
if (pdoc.hidden) this.checkPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||
if (!pdoc) throw new ProblemNotFoundError(domainId, pid);
|
||||
if (pdoc.hidden) this.checkPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN);
|
||||
this.pid = pdoc.docId.toString();
|
||||
this.domainId = domainId;
|
||||
this.dispose = bus.on('record/change', this.onRecordChange.bind(this));
|
||||
|
||||
Reference in new issue
Block a user