feat: Add public routes for hackathons and enhance permissions checks to support both names and IDs

This commit is contained in:
MythEclipse
2025-10-05 20:23:34 +07:00
parent b27e4a4404
commit 7749f6fdec
6 changed files with 74 additions and 10 deletions
@@ -504,11 +504,9 @@ pub async fn delete_hackathon_submission(
pub fn hackathon_routes() -> Router {
Router::new()
// Hackathon routes
.route("/", post(create_hackathon))
.route("/", get(list_hackathons))
.route("/{id}", get(get_hackathon))
.route("/{id}", put(update_hackathon))
// Hackathon routes
.route("/", post(create_hackathon))
.route("/{id}", put(update_hackathon))
.route("/{id}", delete(delete_hackathon))
// Hackathon Events routes