Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"passport-custom": "^1.1.1",
"passport-jwt": "^4.0.1",
"pdf-lib": "^1.17.1",
"pdfkit": "^0.17.0",
"pdfkit": "^0.18.0",
"qs": "^6.13.1",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
Expand Down
40 changes: 27 additions & 13 deletions src/modules/hackathon/hackathon.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,32 @@ export class HackathonController {
};
}

@Get("/active/static")
@ApiDoc({
summary: "Get Active Hackathon For Static",
response: {
ok: { type: StaticActiveHackathonEntity },
},
})
async getForStatic() {
return Hackathon.query()
.findOne({ active: true })
.withGraphFetched("[events.location, sponsors]");
}

@Get("/active")
@Roles(Role.NONE)
@ApiDoc({
summary: "Get Active Hackathon",
response: {
ok: { type: HackathonResponse },
},
auth: Role.NONE,
})
async getActive() {
return await Hackathon.query().findOne({ active: true });
}

@Get(":id")
@Roles(Role.TEAM)
@ApiDoc({
Expand Down Expand Up @@ -389,17 +415,5 @@ export class HackathonController {

return hackathon;
}

@Get("/active/static")
@ApiDoc({
summary: "Get Active Hackathon For Static",
response: {
ok: { type: StaticActiveHackathonEntity },
},
})
async getForStatic() {
return Hackathon.query()
.findOne({ active: true })
.withGraphFetched("[events.location, sponsors]");
}
}

Loading
Loading