mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
core&ui: add error & fix error notification (#464)
This commit is contained in:
1 parent
a2ea3812df
commit
534a634028
14 files changed
+123
-76
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { omit, pick, throttle } from 'lodash';
|
||||
import { FilterQuery, ObjectID } from 'mongodb';
|
||||
import {
|
||||
ContestNotAttendedError, ContestNotFoundError, ForbiddenError, PermissionError,
|
||||
ContestNotAttendedError, ContestNotFoundError, HackRejudgeFailedError, PermissionError,
|
||||
ProblemNotFoundError, RecordNotFoundError, UserNotFoundError,
|
||||
} from '../error';
|
||||
import { RecordDoc, Tdoc } from '../interface';
|
||||
@@ -186,7 +186,7 @@ class RecordDetailHandler extends ContestDetailBaseHandler {
|
||||
@param('rid', Types.ObjectID)
|
||||
async post() {
|
||||
this.checkPerm(PERM.PERM_REJUDGE);
|
||||
if (this.rdoc.files?.hack) throw new ForbiddenError('Cannot rejudge a hack record.');
|
||||
if (this.rdoc.files?.hack) throw new HackRejudgeFailedError();
|
||||
}
|
||||
|
||||
@param('rid', Types.ObjectID)
|
||||
|
||||
Reference in new issue
Block a user