core: 整合tag与category

This commit is contained in:
undefined committed 2021-03-07 14:25:16 +08:00
1 parent 454afbcb08
commit 7a41fecb0e
15 files changed
+116 -117

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ class FpsProblemImportHandler extends Handler {
};
const title = decodeHTML(p.title.join(' '));
const tags = filter(p.source, (i: string) => i.trim());
const pid = await problem.add(domainId, null, title, content, this.user._id, tags, []);
const pid = await problem.add(domainId, null, title, content, this.user._id, tags);
await problem.addTestdata(domainId, pid, 'config.yaml', Buffer.from(`time: ${config.time}\nmemory: ${config.memory}`));
if (p.test_output) {
for (let i = 0; i < p.test_input.length; i++) {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/fps-importer",
"version": "1.1.7",
"version": "1.1.8",
"description": "Import FPS problems",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",
@@ -17,7 +17,7 @@
"bson": "^4.2.2"
},
"peerDependencies": {
"hydrooj": "^2.15.0"
"hydrooj": "^2.20.0"
},
"scripts": {
"build": "tsc",