mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
题目搜索,收藏功能
This commit is contained in:
1 parent
a248425db6
commit
441eeadaf3
23 files changed
+158
-97
No files matched your search
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "migrate-vijos",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.0",
|
||||
"description": "Migrate From Vijos"
|
||||
}
|
||||
@@ -236,7 +236,13 @@ async function discussionNode(src, report) {
|
||||
const category = item[0];
|
||||
const nodes = item[1];
|
||||
for (const node of nodes || []) {
|
||||
t.push(discussion.addNode(doc.domain_id, node.name, category));
|
||||
if (node.pic) {
|
||||
t.push(discussion.addNode(
|
||||
doc.domain_id, node.name, category, { pic: node.pic },
|
||||
));
|
||||
} else {
|
||||
t.push(discussion.addNode(doc.domain_id, node.name, category));
|
||||
}
|
||||
}
|
||||
}
|
||||
await Promise.all(t).catch((e) => e);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "problem-import-syzoj",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Import problem from syzoj."
|
||||
}
|
||||
@@ -11,8 +11,8 @@ async function syzoj(url, handler) {
|
||||
const [, host, pid] = RE_SYZOJ.exec(url);
|
||||
const res = await superagent.get(`${url}export`);
|
||||
assert(res.status === 200, new RemoteOnlineJudgeError('Cannot connect to target server'));
|
||||
assert(res.data.success, new RemoteOnlineJudgeError((res.data.error || {}).message));
|
||||
const p = res.data.obj;
|
||||
assert(res.body.success, new RemoteOnlineJudgeError((res.body.error || {}).message));
|
||||
const p = res.body.obj;
|
||||
const content = [];
|
||||
if (p.description) {
|
||||
content.push(
|
||||
@@ -64,8 +64,8 @@ async function syzoj(url, handler) {
|
||||
type: p.type,
|
||||
},
|
||||
};
|
||||
const r = await download(`${url}testdata/download`);
|
||||
const r = download(`${url}testdata/download`);
|
||||
return [pdoc, r];
|
||||
}
|
||||
|
||||
global.Hydro.lib['import.syzoj'] = syzoj;
|
||||
global.Hydro.lib['import.syzoj'] = module.exports = syzoj;
|
||||
Reference in new issue
Block a user