mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: drop graphql apis
This commit is contained in:
1 parent
0f7961d675
commit
6e16d03f67
52 files changed
+485
-583
No files matched your search
@@ -4,7 +4,7 @@ import PQueue from 'p-queue';
|
||||
import streamsaver from 'streamsaver';
|
||||
import Notification from 'vj/components/notification';
|
||||
import {
|
||||
api, createZipStream, gql, i18n, pipeStream, request,
|
||||
api, createZipStream, i18n, pipeStream, request,
|
||||
} from 'vj/utils';
|
||||
import { ctx } from '../../context';
|
||||
|
||||
@@ -94,23 +94,21 @@ export async function downloadProblemSet(pids, name = 'Export') {
|
||||
try {
|
||||
await ctx.serial('problemset/download', pids, name, targets);
|
||||
for (const pid of pids) {
|
||||
const pdoc = await api(gql`
|
||||
problem(id: ${+pid}) {
|
||||
pid
|
||||
owner
|
||||
title
|
||||
content
|
||||
tag
|
||||
nSubmit
|
||||
nAccept
|
||||
data {
|
||||
name
|
||||
}
|
||||
additional_file {
|
||||
name
|
||||
}
|
||||
}
|
||||
`, ['data', 'problem']);
|
||||
const pdoc = await api('problem', { id: +pid }, {
|
||||
pid: 1,
|
||||
owner: 1,
|
||||
title: 1,
|
||||
content: 1,
|
||||
tag: 1,
|
||||
nSubmit: 1,
|
||||
nAccept: 1,
|
||||
data: {
|
||||
name: 1,
|
||||
},
|
||||
additional_file: {
|
||||
name: 1,
|
||||
},
|
||||
});
|
||||
targets.push({
|
||||
filename: `${pid}/problem.yaml`,
|
||||
content: dump({
|
||||
|
||||
Reference in new issue
Block a user