eslint: variable naming

This commit is contained in:
undefined committed 2022-01-14 03:00:19 +08:00
1 parent 55a95b97ea
commit 268ac23b26
17 files changed
+96 -52

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ import { Handler, Route } from 'hydrooj/src/service/server';
fs.ensureDirSync('/tmp/hydro/import-qduoj');
class ImportQduojHandler extends Handler {
async ImportFromFile(domainId: string, zipfile: string) {
async fromFile(domainId: string, zipfile: string) {
const zip = new AdmZip(zipfile);
const tmp = path.resolve(os.tmpdir(), 'hydro', 'import-qduoj', String.random(32));
await new Promise((resolve, reject) => {
@@ -121,7 +121,7 @@ class ImportQduojHandler extends Handler {
if (!this.request.files.file) throw new ValidationError('file');
const stat = await fs.stat(this.request.files.file.path);
if (stat.size > 128 * 1024 * 1024) throw new ValidationError('file', 'File too large');
await this.ImportFromFile(domainId, this.request.files.file.path);
await this.fromFile(domainId, this.request.files.file.path);
this.response.redirect = this.url('problem_main');
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/import-qduoj",
"version": "1.3.2",
"version": "1.3.3",
"description": "Import QDUOJ problem export",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",