Browse Source

Merge branch 'master' of zhaojunzhe/fair-web into master

pull/31/head
richie 5 years ago committed by Gogs
parent
commit
652bc1c599
  1. 2
      libs/judger.js
  2. 2
      models-built/user.js
  3. 2
      models-built/user.js.map
  4. 2
      models/user.ts
  5. 1
      views/submissions_item.ejs

2
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

2
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([

2
models-built/user.js.map

File diff suppressed because one or more lines are too long

2
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 })

1
views/submissions_item.ejs

@ -108,6 +108,7 @@
</template>
<template v-else>
<td v-if="config.showScore"><a :href="submissionLink"><span class="score score_0">0</span></a></td>
<td v-if="config.showUsage">0 ms</td>
<td v-if="config.showUsage">0 ms</td>
<td v-if="config.showUsage">0 B</td>
</template>

Loading…
Cancel
Save