mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core: 添加handler/create和handler/init事件
This commit is contained in:
1 parent
f7478ab346
commit
3040f17702
5 files changed
+14
-2
No files matched your search
@@ -379,7 +379,7 @@ export class ProblemFilesHandler extends ProblemDetailHandler {
|
||||
async postUploadFile(domainId: string, filename: string, type = 'testdata') {
|
||||
if (!this.request.files.file) throw new ValidationError('file');
|
||||
if (this.pdoc.owner !== this.user._id) this.checkPerm(PERM.PERM_EDIT_PROBLEM);
|
||||
if (filename === 'testdata.zip') {
|
||||
if (filename.endsWith('.zip')) {
|
||||
const zip = new AdmZip(this.request.files.file.path);
|
||||
const entries = zip.getEntries();
|
||||
for (const entry of entries) {
|
||||
|
||||
Reference in new issue
Block a user