diff --git a/imphnen-cms/src/qr/campaigns/infrastructure/http/routes.rs b/imphnen-cms/src/qr/campaigns/infrastructure/http/routes.rs index ccdee32..ee61333 100644 --- a/imphnen-cms/src/qr/campaigns/infrastructure/http/routes.rs +++ b/imphnen-cms/src/qr/campaigns/infrastructure/http/routes.rs @@ -32,8 +32,8 @@ pub fn qr_campaigns_routes(pool: Arc) -> Router { "/campaigns", post(create_campaign_handler).get(list_campaigns_handler), ) - .route("/campaigns/:id/activate", put(activate_campaign_handler)) - .route("/campaigns/:id", delete(delete_campaign_handler)) + .route("/campaigns/{id}/activate", put(activate_campaign_handler)) + .route("/campaigns/{id}", delete(delete_campaign_handler)) .route("/campaigns/process-image", post(process_image_handler)) .layer(Extension(service)) .layer(Extension(pool)) diff --git a/imphnen-cms/src/qr/users/infrastructure/http/routes.rs b/imphnen-cms/src/qr/users/infrastructure/http/routes.rs index 9dba025..186e6a6 100644 --- a/imphnen-cms/src/qr/users/infrastructure/http/routes.rs +++ b/imphnen-cms/src/qr/users/infrastructure/http/routes.rs @@ -29,8 +29,8 @@ pub fn qr_users_routes(pool: Arc) -> Router { Router::new() .route("/users/me", get(get_me_handler).put(update_me_handler)) .route("/users", get(list_users_handler)) - .route("/users/:id/role", put(update_role_handler)) - .route("/users/:id", delete(delete_user_handler)) + .route("/users/{id}/role", put(update_role_handler)) + .route("/users/{id}", delete(delete_user_handler)) .layer(Extension(service)) .layer(Extension(pool)) .layer(from_fn(qr_auth_middleware)) diff --git a/imphnen-hackathon/src/admin/infrastructure/http/routes.rs b/imphnen-hackathon/src/admin/infrastructure/http/routes.rs index 437b35d..3188c35 100644 --- a/imphnen-hackathon/src/admin/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/admin/infrastructure/http/routes.rs @@ -20,18 +20,18 @@ pub fn hackathon_admin_routes(pool: Arc) -> Router { Router::new() .route("/admin/users", get(admin_list_users)) .route( - "/admin/users/:user_id", + "/admin/users/{user_id}", get(admin_get_user).delete(admin_delete_user), ) - .route("/admin/users/:user_id/set-admin", post(admin_set_admin)) + .route("/admin/users/{user_id}/set-admin", post(admin_set_admin)) .route("/admin/teams", get(admin_list_teams)) - .route("/admin/teams/:team_id", delete(admin_delete_team)) + .route("/admin/teams/{team_id}", delete(admin_delete_team)) .route("/admin/submissions", get(admin_list_submissions)) .route( "/admin/winners", get(admin_list_winners).post(admin_set_winner), ) - .route("/admin/winners/:team_id", delete(admin_remove_winner)) + .route("/admin/winners/{team_id}", delete(admin_remove_winner)) .layer(Extension(service)) .layer(Extension(pool.clone())) .layer(from_fn(admin_only)) diff --git a/imphnen-hackathon/src/certificates/infrastructure/http/routes.rs b/imphnen-hackathon/src/certificates/infrastructure/http/routes.rs index e99a778..5aa5c47 100644 --- a/imphnen-hackathon/src/certificates/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/certificates/infrastructure/http/routes.rs @@ -11,7 +11,7 @@ pub fn hackathon_certificates_routes(pool: Arc) -> Router { Arc::new(PostgresCertificateRepository::new(pool.clone())), )); Router::new() - .route("/certificates/:user_id", get(get_certificate_handler)) + .route("/certificates/{user_id}", get(get_certificate_handler)) .layer(Extension(service)) .layer(Extension(pool)) } diff --git a/imphnen-hackathon/src/chat/infrastructure/http/routes.rs b/imphnen-hackathon/src/chat/infrastructure/http/routes.rs index 3f13d63..129e326 100644 --- a/imphnen-hackathon/src/chat/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/chat/infrastructure/http/routes.rs @@ -17,10 +17,10 @@ pub fn build_chat_routes(pool: Arc) -> Router { ))); Router::new() .route( - "/chat/teams/:team_id", + "/chat/teams/{team_id}", get(get_team_messages_handler).post(send_message_handler), ) - .route("/chat/messages/:message_id", delete(delete_message_handler)) + .route("/chat/messages/{message_id}", delete(delete_message_handler)) .layer(Extension(service)) .layer(Extension(pool)) .layer(from_fn(hackathon_auth_middleware)) diff --git a/imphnen-hackathon/src/invitations/infrastructure/http/routes.rs b/imphnen-hackathon/src/invitations/infrastructure/http/routes.rs index 2145a03..dc33eca 100644 --- a/imphnen-hackathon/src/invitations/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/invitations/infrastructure/http/routes.rs @@ -18,11 +18,11 @@ pub fn build_invitation_routes(pool: Arc) -> Router { Router::new() .route("/invitations/my", get(get_my_invitations_handler)) .route( - "/invitations/:invitation_id/respond", + "/invitations/{invitation_id}/respond", post(respond_to_invitation_handler), ) .route( - "/invitations/teams/:team_id/invite", + "/invitations/teams/{team_id}/invite", post(invite_team_member_handler), ) .layer(Extension(service)) diff --git a/imphnen-hackathon/src/join_requests/infrastructure/http/routes.rs b/imphnen-hackathon/src/join_requests/infrastructure/http/routes.rs index dd9bf6e..96f339c 100644 --- a/imphnen-hackathon/src/join_requests/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/join_requests/infrastructure/http/routes.rs @@ -17,16 +17,16 @@ pub fn build_join_request_routes(pool: Arc) -> Router { )); Router::new() .route( - "/join-requests/teams/:team_id", + "/join-requests/teams/{team_id}", post(create_join_request_handler), ) .route("/join-requests/my", get(get_my_join_requests_handler)) .route( - "/join-requests/teams/:team_id/pending", + "/join-requests/teams/{team_id}/pending", get(get_team_join_requests_handler), ) .route( - "/join-requests/:request_id/respond", + "/join-requests/{request_id}/respond", post(respond_to_join_request_handler), ) .layer(Extension(service)) diff --git a/imphnen-hackathon/src/submissions/infrastructure/http/routes.rs b/imphnen-hackathon/src/submissions/infrastructure/http/routes.rs index 6621456..9efa95d 100644 --- a/imphnen-hackathon/src/submissions/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/submissions/infrastructure/http/routes.rs @@ -17,23 +17,23 @@ pub fn hackathon_submissions_routes(pool: Arc) -> Router { )); Router::new() .route( - "/submissions/teams/:team_id", + "/submissions/teams/{team_id}", get(get_team_submission_handler).post(create_submission_handler), ) .route( - "/submissions/:submission_id", + "/submissions/{submission_id}", put(update_submission_handler), ) .route( - "/submissions/:submission_id/submit", + "/submissions/{submission_id}/submit", post(submit_project_handler), ) .route( - "/submissions/:submission_id/confirm", + "/submissions/{submission_id}/confirm", post(confirm_submission_handler), ) .route( - "/submissions/:submission_id/cancel", + "/submissions/{submission_id}/cancel", post(cancel_submission_handler), ) .layer(Extension(service)) diff --git a/imphnen-hackathon/src/teams/infrastructure/http/routes.rs b/imphnen-hackathon/src/teams/infrastructure/http/routes.rs index 5c11bf1..25275d1 100644 --- a/imphnen-hackathon/src/teams/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/teams/infrastructure/http/routes.rs @@ -17,19 +17,19 @@ pub fn build_team_routes(pool: Arc) -> Router { let public = Router::new() .route("/teams/browse", get(browse_teams_handler)) - .route("/teams/:team_id", get(get_team_handler)) + .route("/teams/{team_id}", get(get_team_handler)) .layer(Extension(service.clone())); let protected = Router::new() .route("/teams", post(create_team_handler)) .route("/teams/my", get(get_my_teams_handler)) .route( - "/teams/:team_id", + "/teams/{team_id}", put(update_team_handler).delete(delete_team_handler), ) - .route("/teams/:team_id/leave", post(leave_team_handler)) + .route("/teams/{team_id}/leave", post(leave_team_handler)) .route( - "/teams/:team_id/members/:member_id", + "/teams/{team_id}/members/{member_id}", delete(remove_member_handler), ) .layer(Extension(service)) diff --git a/imphnen-hackathon/src/users/infrastructure/http/routes.rs b/imphnen-hackathon/src/users/infrastructure/http/routes.rs index d633fbd..fece8a4 100644 --- a/imphnen-hackathon/src/users/infrastructure/http/routes.rs +++ b/imphnen-hackathon/src/users/infrastructure/http/routes.rs @@ -16,8 +16,8 @@ pub fn hackathon_users_routes(pool: Arc) -> Router { let service = build_service(pool.clone()); Router::new() .route("/users/me", get(get_me_handler).put(update_me_handler)) - .route("/users/:user_id", get(get_user_handler)) - .route("/users/:user_id/teams", get(get_user_teams_handler)) + .route("/users/{user_id}", get(get_user_handler)) + .route("/users/{user_id}/teams", get(get_user_teams_handler)) .layer(Extension(service)) .layer(Extension(pool)) .layer(from_fn(hackathon_auth_middleware))