1
1
mirror of https://github.com/renbaoshuo/S2OJ.git synced 2025-03-31 21:27:02 +00:00

chore(remote_judger/codeforces): include source code in result

This commit is contained in:
Baoshuo Ren 2023-04-08 16:02:44 +08:00
parent 36ff691a04
commit d897a27801
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

@ -390,6 +390,16 @@ export default class CodeforcesProvider implements IBasicProvider {
if (body.waiting === 'true') continue;
let files = [];
if (body?.source) {
files.push({
name: 'answer.code',
content: body.source,
lang: '/',
});
}
const testCount = +body.testCount;
const status =
VERDICT[
@ -450,6 +460,7 @@ export default class CodeforcesProvider implements IBasicProvider {
time,
memory,
details,
result: { files },
});
} catch (e) {
logger.error(e);