fix(remote_judger/uoj): submission id

This commit is contained in:
Baoshuo Ren 2023-01-22 17:51:45 +08:00
parent 61545c6807
commit 195f21fab6
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -156,12 +156,19 @@ export default class UOJProvider implements IBasicProvider {
return text;
}
async submitProblem(id: string, lang: string, code: string, info) {
async submitProblem(
id: string,
lang: string,
code: string,
submissionId: number,
next,
end
) {
const programType = langs_map[lang] || langs_map['C++'];
const comment = programType.comment;
if (comment) {
const msg = `S2OJ Submission #${info.rid} @ ${new Date().getTime()}`;
const msg = `S2OJ Submission #${submissionId} @ ${new Date().getTime()}`;
if (typeof comment === 'string') code = `${comment} ${msg}\n${code}`;
else if (comment instanceof Array)
code = `${comment[0]} ${msg} ${comment[1]}\n${code}`;