better types & use attend instead of enroll

This commit is contained in:
undefined committed 2020-09-07 12:43:09 +08:00
1 parent e7428c8f79
commit 3dd4c1c994
17 files changed
+141 -82

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/migrate-vijos",
"version": "1.3.7",
"version": "1.3.8",
"main": "package.json",
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <masnn0@outlook.com>",
@@ -14,7 +14,7 @@
"@types/mongodb": "^3.5.27"
},
"peerDependencies": {
"hydrooj": "^2.13.0"
"hydrooj": "^2.13.5"
},
"dependencies": {
"js-yaml": "^3.14.0",
+3 -3
View File
@@ -1,6 +1,6 @@
/* eslint-disable no-await-in-loop */
import {
Rdoc, TestCase, Mdoc, Drrdoc,
Rdoc, TestCase, Mdoc, Drrdoc, TrainingNode,
} from 'hydrooj';
import fs from 'fs';
import os from 'os';
@@ -126,12 +126,12 @@ const tasks = {
},
attend: 'attend',
desc: 'description',
enroll: 'enroll',
enroll: 'attend',
rated: 'rated',
dag: {
field: 'dag',
processer: (dag) => {
const r = [];
const r: TrainingNode[] = [];
for (const t of dag) {
r.push({
_id: t._id,