core: add default import operator

pull/532/head^2
undefined 2 years ago
parent 838594530f
commit ba7f4b396f
No known key found for this signature in database

@ -163,6 +163,7 @@ export enum ProblemType {
SubmitAnswer = 'submit_answer',
Interactive = 'interactive',
Objective = 'objective',
Remote = 'remote_judge',
}
export enum SubtaskType {

@ -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
}
}

@ -106,10 +106,6 @@ about:
我们力求对服务进行完善的维护,以保护信息免遭意外或恶意的破坏。因此,当您从我们的服务中删除信息后,
我们可能不会立即从在用的服务器中删除这些信息的残留副本,也可能不会从备份系统中删除相应的信息。
#### 4. 信息安全
我们为您提供SSL加密访问服务您可以通过SSL(https)使用我们的服务,这可以很大程度上保障在传输过程中您信息的安全。
对于敏感数据(如您的密码),我们承诺在存储时进行高强度不可逆加密。{{ name }} 的管理员、维护人员等均不能够访问到敏感数据的明文,所有操作均无人工介入。
# tos 服务条款
#### 0. 欢迎使用 {{ name }}
注册 {{ name }} 帐户和/或使用 {{ name }} 提供的服务(包括网页提供的在线服务和题目评测的非在线服务等),即表示您已同意本条款。

Loading…
Cancel
Save