mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: codeforces: fix submit payload
This commit is contained in:
1 parent
9d8f165c40
commit
d7604da021
1 file changed
+5
-1
@@ -283,7 +283,10 @@ export default class CodeforcesProvider extends BasicFetcher implements IBasicPr
|
|||||||
? '/problemset/submit'
|
? '/problemset/submit'
|
||||||
: `/gym/${contestId}/submit`);
|
: `/gym/${contestId}/submit`);
|
||||||
// TODO check submit time to ensure submission
|
// TODO check submit time to ensure submission
|
||||||
const { text: submit } = await this.post(`/${type !== 'GYM' ? 'problemset' : `gym/${contestId}`}/submit?csrf_token=${csrf}`).send({
|
const endpoint = type === 'GYM'
|
||||||
|
? `/gym/${contestId}/submit?csrf_token=${csrf}`
|
||||||
|
: `/problemset/submit/${contestId}/${problemId}?csrf_token=${csrf}`;
|
||||||
|
const { text: submit } = await this.post(endpoint).send({
|
||||||
csrf_token: csrf,
|
csrf_token: csrf,
|
||||||
action: 'submitSolutionFormSubmitted',
|
action: 'submitSolutionFormSubmitted',
|
||||||
programTypeId,
|
programTypeId,
|
||||||
@@ -298,6 +301,7 @@ export default class CodeforcesProvider extends BasicFetcher implements IBasicPr
|
|||||||
submittedProblemCode: contestId + problemId,
|
submittedProblemCode: contestId + problemId,
|
||||||
sourceCodeConfirmed: true,
|
sourceCodeConfirmed: true,
|
||||||
} : {
|
} : {
|
||||||
|
contestId,
|
||||||
submittedProblemIndex: problemId,
|
submittedProblemIndex: problemId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user