File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,12 @@ async fn handle_routing(
86
86
req : Request < Body > ,
87
87
( adapter, config) : ( impl Adapter , Config ) ,
88
88
) -> Response < Body > {
89
- if req. uri ( ) . path ( ) . starts_with ( "/cfg" ) && req. method ( ) == Method :: GET {
90
- crate :: routes:: cfg:: return_config ( & config)
91
- } else if req . uri ( ) . path ( ) . starts_with ( "/channel" ) {
92
- crate :: routes:: channel:: handle_channel_routes ( req, adapter) . await
93
- } else {
94
- Err ( ResponseError :: NotFound )
89
+ match ( req. uri ( ) . path ( ) , req. method ( ) ) {
90
+ ( "/cfg" , & Method :: GET ) => crate :: routes:: cfg:: return_config ( & config) ,
91
+ ( route , _ ) if route . starts_with ( "/channel" ) => {
92
+ crate :: routes:: channel:: handle_channel_routes ( req, adapter) . await
93
+ }
94
+ _ => Err ( ResponseError :: NotFound ) ,
95
95
}
96
96
. unwrap_or_else ( |response_err| match response_err {
97
97
ResponseError :: NotFound => not_found ( ) ,
You can’t perform that action at this time.
0 commit comments