@@ -75,11 +75,11 @@ pub async fn middleware(
7575fn is_cargo_endpoint ( method : & Method , path : & str ) -> bool {
7676 const CARGO_ENDPOINTS : & [ ( Method , & str ) ] = & [
7777 ( Method :: PUT , "/api/v1/crates/new" ) ,
78- ( Method :: DELETE , "/api/v1/crates/: crate_id/: version/yank" ) ,
79- ( Method :: PUT , "/api/v1/crates/: crate_id/: version/unyank" ) ,
80- ( Method :: GET , "/api/v1/crates/: crate_id/owners" ) ,
81- ( Method :: PUT , "/api/v1/crates/: crate_id/owners" ) ,
82- ( Method :: DELETE , "/api/v1/crates/: crate_id/owners" ) ,
78+ ( Method :: DELETE , "/api/v1/crates/{ crate_id}/{ version} /yank" ) ,
79+ ( Method :: PUT , "/api/v1/crates/{ crate_id}/{ version} /unyank" ) ,
80+ ( Method :: GET , "/api/v1/crates/{ crate_id} /owners" ) ,
81+ ( Method :: PUT , "/api/v1/crates/{ crate_id} /owners" ) ,
82+ ( Method :: DELETE , "/api/v1/crates/{ crate_id} /owners" ) ,
8383 ( Method :: GET , "/api/v1/crates" ) ,
8484 ] ;
8585
@@ -154,7 +154,7 @@ mod tests {
154154 . route ( "/500" , internal)
155155 . route ( "/api/v1/crates/new" , put ( || async { StatusCode :: CREATED } ) )
156156 . route (
157- "/api/v1/crates/: crate_id/owners" ,
157+ "/api/v1/crates/{ crate_id} /owners" ,
158158 get ( || async { StatusCode :: INTERNAL_SERVER_ERROR } ) ,
159159 )
160160 . layer ( from_fn_with_state ( StatusCodeConfig :: AdjustAll , middleware) )
0 commit comments