Repository: juspay/hyperswitch
File: crates/router/src/routes/app.rs (Rust)

Code before:
        #[cfg(feature = "olap")]
        {
            route =
                route.service(web::resource("/filter").route(
                    web::get().to(
                        payment_methods::list_countries_currencies_for_connector_payment_method,
                    ),
                ));
        }
        #[cfg(feature = "oltp")]
        {
            route = route
                .service(
                    web::resource("")
                        .route(web::post().to(payment_methods::create_payment_method_api)),
                )
                .service(
                    web::resource("/create-intent")
                        .route(web::post().to(payment_methods::create_payment_method_intent_api)),
                )
                .service(
                    web::resource("/{payment_method_id}/check-network-token-status")
                        .route(web::get().to(payment_methods::network_token_status_check_api)),
                )
                .service(
                    web::resource("/details/{temporary_token}").route(
                        web::get().to(payment_methods::payment_method_get_token_details_api),
                    ),
                );

            route = route.service(
                web::scope("/{id}")
                    .service(
                        web::resource("")
                            .route(web::get().to(payment_methods::payment_method_retrieve_api))
                            .route(web::delete().to(payment_methods::payment_method_delete_api)),
                    )
                    .service(web::resource("/list-enabled-payment-methods").route(
                        web::get().to(payment_methods::payment_method_session_list_payment_methods),
                    ))
                    .service(
                        web::resource("/update-saved-payment-method")
                            .route(web::put().to(payment_methods::payment_method_update_api)),
                    )
                    .service(
                        web::resource("/get-token")
                            .route(web::get().to(payment_methods::get_payment_method_token_data)),
                    ),
            );
        }


Review comment (suggestion):
```suggestion
                    web::resource("/token/{payment_method_token}/details").route(
```

Code after:
        #[cfg(feature = "olap")]
        {
            route =
                route.service(web::resource("/filter").route(
                    web::get().to(
                        payment_methods::list_countries_currencies_for_connector_payment_method,
                    ),
                ));
        }
        #[cfg(feature = "oltp")]
        {
            route = route
                .service(
                    web::resource("")
                        .route(web::post().to(payment_methods::create_payment_method_api)),
                )
                .service(
                    web::resource("/create-intent")
                        .route(web::post().to(payment_methods::create_payment_method_intent_api)),
                )
                .service(
                    web::resource("/{payment_method_id}/check-network-token-status")
                        .route(web::get().to(payment_methods::network_token_status_check_api)),
                )
                .service(
                    web::resource("/token/{payment_method_temporary_token}/details").route(
                        web::get().to(payment_methods::payment_method_get_token_details_api),
                    ),
                );

            route = route.service(
                web::scope("/{id}")
                    .service(
                        web::resource("")
                            .route(web::get().to(payment_methods::payment_method_retrieve_api))
                            .route(web::delete().to(payment_methods::payment_method_delete_api)),
                    )
                    .service(web::resource("/list-enabled-payment-methods").route(
                        web::get().to(payment_methods::payment_method_session_list_payment_methods),
                    ))
                    .service(
                        web::resource("/update-saved-payment-method")
                            .route(web::put().to(payment_methods::payment_method_update_api)),
                    )
                    .service(
                        web::resource("/get-token")
                            .route(web::get().to(payment_methods::get_payment_method_token_data)),
                    ),
            );
        }