File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
crates/common/src/integrations Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -288,22 +288,17 @@ impl IntegrationProxy for PrebidIntegration {
288288 let path = req. get_path ( ) . to_string ( ) ;
289289 let method = req. get_method ( ) . clone ( ) ;
290290
291- if method == Method :: GET {
292- if let Some ( script_path) = & self . config . script_handler {
293- if path == * script_path {
294- return self . handle_script_handler ( ) ;
295- }
291+ match method {
292+ Method :: GET if self . config . script_handler . as_ref ( ) == Some ( & path) => self . handle_script_handler ( ) ,
293+ Method :: GET if path == ROUTE_FIRST_PARTY_AD => {
294+ self . handle_first_party_ad ( settings, req) . await
296295 }
297- }
298-
299- if method == Method :: GET && path == ROUTE_FIRST_PARTY_AD {
300- self . handle_first_party_ad ( settings, req) . await
301- } else if method == Method :: POST && path == ROUTE_THIRD_PARTY_AD {
302- self . handle_third_party_ad ( settings, req) . await
303- } else {
304- Err ( Report :: new ( Self :: error ( format ! (
296+ Method :: POST if path == ROUTE_THIRD_PARTY_AD => {
297+ self . handle_third_party_ad ( settings, req) . await
298+ }
299+ _ => Err ( Report :: new ( Self :: error ( format ! (
305300 "Unsupported Prebid route: {path}"
306- ) ) ) )
301+ ) ) ) ) ,
307302 }
308303 }
309304}
You can’t perform that action at this time.
0 commit comments