mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: support HYDRO_TESTCASE
This commit is contained in:
1 parent
9ea781f800
commit
ede8a26253
5 files changed
+6
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.4.19",
|
||||
"version": "3.4.20",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -256,8 +256,9 @@ export function flushNodes(domainId: string) {
|
||||
|
||||
export async function getVnode(domainId: string, type: number, id: string, uid?: number) {
|
||||
if (type === document.TYPE_PROBLEM) {
|
||||
const pdoc = await problem.get(domainId, Number.isSafeInteger(+id) ? +id : id);
|
||||
let pdoc = await problem.get(domainId, Number.isSafeInteger(+id) ? +id : id, problem.PROJECTION_LIST);
|
||||
if (!pdoc) throw new DiscussionNodeNotFoundError(id);
|
||||
if (pdoc.hidden) pdoc = problem.default;
|
||||
return { ...pdoc, type, id: pdoc.docId };
|
||||
}
|
||||
if ([document.TYPE_CONTEST, document.TYPE_TRAINING, document.TYPE_HOMEWORK].includes(type as any)) {
|
||||
|
||||
Reference in new issue
Block a user