diff --git a/packages/hydrojudge/src/judge/default.ts b/packages/hydrojudge/src/judge/default.ts index 45fb3bca7..66d498737 100644 --- a/packages/hydrojudge/src/judge/default.ts +++ b/packages/hydrojudge/src/judge/default.ts @@ -16,7 +16,7 @@ const Score = { min: Math.min, }; -function judgeCase(c, sid) { +function judgeCase(c, sid: string) { return async (ctx, ctxSubtask) => { if (ctx.config.template) { if (ctx.config.template[ctx.lang]) { @@ -105,7 +105,7 @@ function judgeCase(c, sid) { }; } -function judgeSubtask(subtask, sid) { +function judgeSubtask(subtask, sid: string) { return async (ctx) => { subtask.type = subtask.type || 'min'; const ctxSubtask = { @@ -173,6 +173,7 @@ export const judge = async (ctx) => { if (ctx.failed[required.toString()]) effective = false; } if (effective) ctx.total_score += scores[sid]; + console.log(effective, ctx.total_score, scores[sid], sid); } ctx.stat.done = new Date(); if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) }); diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index c3c297843..79bb787e3 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "2.29.31", + "version": "2.29.32", "bin": "bin/hydrooj.js", "main": "dist/loader.js", "typings": "dist/loader.d.ts", diff --git a/packages/hydrooj/src/handler/domain.ts b/packages/hydrooj/src/handler/domain.ts index 046bc7af1..fcfebf016 100644 --- a/packages/hydrooj/src/handler/domain.ts +++ b/packages/hydrooj/src/handler/domain.ts @@ -288,7 +288,7 @@ class DomainJoinHandler extends Handler { } } await domain.setUserRole(this.domain._id, this.user._id, this.joinSettings.role); - this.response.redirect = this.url('domain_main', { query: { notification: 'Successfully joined domain.' } }); + this.response.redirect = this.url('homepage', { query: { notification: 'Successfully joined domain.' } }); } }