mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: ignore homework
This commit is contained in:
1 parent
f52be39803
commit
95366dc860
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "4.0.16",
|
"version": "4.0.17",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/plugin-api",
|
"main": "src/plugin-api",
|
||||||
"module": "src/plugin-api",
|
"module": "src/plugin-api",
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ export class ContestDetailBaseHandler extends Handler {
|
|||||||
|
|
||||||
@param('tid', Types.ObjectID, true)
|
@param('tid', Types.ObjectID, true)
|
||||||
async after(domainId: string, tid: ObjectID) {
|
async after(domainId: string, tid: ObjectID) {
|
||||||
if (!tid || this.request.json || !this.response.template || !contest.isOngoing(this.tdoc, this.tsdoc)) return;
|
if (!tid || this.tdoc.rule === 'homework' || !contest.isOngoing(this.tdoc, this.tsdoc)) return;
|
||||||
|
if (this.request.json || !this.response.template) return;
|
||||||
const pdoc = 'pdoc' in this ? (this as any).pdoc : {};
|
const pdoc = 'pdoc' in this ? (this as any).pdoc : {};
|
||||||
this.response.body.overrideNav = [
|
this.response.body.overrideNav = [
|
||||||
{ name: 'homepage', args: { prefix: 'homepage' }, checker: () => true },
|
{ name: 'homepage', args: { prefix: 'homepage' }, checker: () => true },
|
||||||
|
|||||||
Reference in new issue
Block a user