core: support ContentNode[] format

This commit is contained in:
undefined committed 2020-12-05 23:44:17 +08:00
1 parent 151cc79f36
commit b0aa983e6f
12 files changed
+640 -130

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import * as file from './file';
import * as document from './document';
import * as domain from './domain';
import { ProblemStatusDoc, ProblemDataSource, Pdict } from '../interface';
import { Content } from '../loader';
import { NumberKeys, Projection } from '../typeutils';
import { ProblemNotFoundError } from '../error';
import * as testdataConfig from '../lib/testdataConfig';
@@ -78,7 +79,7 @@ export const PROJECTION_PUBLIC: Pdoc.Field[] = [
];
export async function add(
domainId: string, pid: string = null, title: string, content: string, owner: number,
domainId: string, pid: string = null, title: string, content: Content, owner: number,
tag: string[] = [], category: string[] = [], data: ProblemDataSource = null, hidden = false,
) {
const pidCounter = await domain.inc(domainId, 'pidCounter', 1);