chore(remote_judger/codeforces): include source code in result
All checks were successful
continuous-integration/drone/push Build is passing

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

View File

@ -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);