diff --git a/libs/judger.js b/libs/judger.js index 80fd6f3..173f846 100644 --- a/libs/judger.js +++ b/libs/judger.js @@ -176,7 +176,7 @@ async function connect() { let problemQuery = await Problem.createQueryBuilder(); const problemInfo = await problemQuery.where("id = :id", { id: problemId }).getOne(); const problem_time_limit = problemInfo.time_limit; - const subtasksArray = convertedResult.result.judge.subtasks; + const subtasksArray = convertedResult.result.judge ? convertedResult.result.judge.subtasks : []; const timeArray = subtasksArray.map((subtasksItem) => { return subtasksItem.cases.map((subtasksItemCases) => { return subtasksItemCases.result.time diff --git a/models-built/user.js b/models-built/user.js index 77fe64c..a7bd588 100644 --- a/models-built/user.js +++ b/models-built/user.js @@ -361,7 +361,7 @@ var User = /** @class */ (function (_super) { __metadata("design:type", String) ], User.prototype, "username"); __decorate([ - TypeORM.Column({ nullable: true, type: "varchar", length: 60, "default": '' }), + TypeORM.Column({ nullable: true, type: "varchar", length: 60, "default": require('randomstring').generate(6) }), __metadata("design:type", String) ], User.prototype, "anonymous_name"); __decorate([ diff --git a/models-built/user.js.map b/models-built/user.js.map index 51f5858..77434c7 100644 --- a/models-built/user.js.map +++ b/models-built/user.js.map @@ -1 +1 @@ -{"version":3,"file":"user.js","sourceRoot":"","sources":["../models/user.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,mCAA6B;AAI7B,6CAAuC;AACvC,mDAA6C;AAC7C,qCAAgC;AAGhC;IAAkC,wBAAK;IAAvC;;IA2MA,CAAC;aA3MoB,IAAI;IA8DV,cAAS,GAAtB,UAAuB,KAAK;;;gBAC1B,sBAAO,MAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,EAAE;4BACL,KAAK,EAAE,KAAK;yBACb;qBACF,CAAC,EAAC;;;KACJ;IAEY,aAAQ,GAArB,UAAsB,IAAI;;;gBACxB,sBAAO,MAAI,CAAC,OAAO,CAAC;wBAClB,KAAK,EAAE;4B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2MtC;qBA3MoB,IAAI"} \ No newline at end of file diff --git a/models/user.ts b/models/user.ts index 891c6e8..83342ba 100644 --- a/models/user.ts +++ b/models/user.ts @@ -18,7 +18,7 @@ export default class User extends Model { @TypeORM.Column({ nullable: true, type: "varchar", length: 80 }) username: string; - @TypeORM.Column({ nullable: true, type: "varchar", length: 60 , default: ''}) + @TypeORM.Column({ nullable: true, type: "varchar", length: 60 , default: require('randomstring').generate(6)}) anonymous_name: string; @TypeORM.Column({ nullable: true, type: "varchar", length: 120 }) diff --git a/views/submissions_item.ejs b/views/submissions_item.ejs index 6cbd033..8d410c1 100644 --- a/views/submissions_item.ejs +++ b/views/submissions_item.ejs @@ -109,6 +109,7 @@