mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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'
|
||||
: `/gym/${contestId}/submit`);
|
||||
// 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,
|
||||
action: 'submitSolutionFormSubmitted',
|
||||
programTypeId,
|
||||
@@ -298,6 +301,7 @@ export default class CodeforcesProvider extends BasicFetcher implements IBasicPr
|
||||
submittedProblemCode: contestId + problemId,
|
||||
sourceCodeConfirmed: true,
|
||||
} : {
|
||||
contestId,
|
||||
submittedProblemIndex: problemId,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user