core: add default import operator

This commit is contained in:
undefined committed 2023-04-12 18:46:39 +08:00
1 parent 838594530f
commit ba7f4b396f
4 files changed
+10 -6

No files matched your search

+1
View File
@@ -163,6 +163,7 @@ export enum ProblemType {
SubmitAnswer = 'submit_answer',
Interactive = 'interactive',
Objective = 'objective',
Remote = 'remote_judge',
}
export enum SubtaskType {
+2 -1
View File
@@ -407,7 +407,7 @@ export class ProblemModel {
return true;
}
static async import(domainId: string, filepath: string, operator: number) {
static async import(domainId: string, filepath: string, operator = 1) {
let tmpdir = '';
let del = false;
if (filepath.endsWith('.zip')) {
@@ -482,6 +482,7 @@ export class ProblemModel {
await fs.mkdir(tmpdir);
const pdocs = await ProblemModel.getMulti(domainId, {}, ProblemModel.PROJECTION_PUBLIC).toArray();
for (const pdoc of pdocs) {
if (process.env.HYDRO_CLI) logger.info(`Exporting problem ${pdoc.pid} (${pdoc.title})`);
const problemPath = path.join(tmpdir, `${pdoc.docId}`);
await fs.mkdir(problemPath);
const problemYaml = path.join(problemPath, 'problem.yaml');
@@ -60,3 +60,9 @@
p
margin-top: rem(7px);
font-size: larger
@media print {
.notification {
display: none !important
}
}
+1 -5
View File
@@ -104,11 +104,7 @@ about:
无论您在何时使用我们的服务,我们都力求让您能够访问自己的个人信息。如果这些信息有误,我们会努力通过各种方式让您快速更新信息或删除信息。
在更新您的个人信息时,我们可能会要求您先验证自己的身份,然后再处理您的请求。
我们力求对服务进行完善的维护,以保护信息免遭意外或恶意的破坏。因此,当您从我们的服务中删除信息后,
我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。
#### 4. 信息安全
我们为您提供SSL加密访问服务,您可以通过SSL(https)使用我们的服务,这可以很大程度上保障在传输过程中您信息的安全。
对于敏感数据(如您的密码),我们承诺在存储时进行高强度不可逆加密。{{ name }} 的管理员、维护人员等均不能够访问到敏感数据的明文,所有操作均无人工介入。
我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。
# tos 服务条款
#### 0. 欢迎使用 {{ name }}