refactor(compatibility): remove specific imports (#181)

This commit is contained in:
Sangamesh Kulkarni
2022-12-20 18:00:40 +05:30
committed by GitHub
parent cb28355459
commit 08e9c079ce
12 changed files with 276 additions and 268 deletions

View File

@ -5,21 +5,19 @@ mod refunds;
mod setup_intents;
use actix_web::{web, Scope};
mod errors;
pub(crate) use errors::ErrorCode;
pub(crate) use self::app::{Customers, PaymentIntents, Refunds, SetupIntents};
use crate::routes::AppState;
use crate::routes;
pub struct StripeApis;
impl StripeApis {
pub(crate) fn server(state: AppState) -> Scope {
pub(crate) fn server(state: routes::AppState) -> Scope {
let max_depth = 10;
let strict = false;
web::scope("/vs/v1")
.app_data(web::Data::new(serde_qs::Config::new(max_depth, strict)))
.service(SetupIntents::server(state.clone()))
.service(PaymentIntents::server(state.clone()))
.service(Refunds::server(state.clone()))
.service(Customers::server(state))
.service(app::SetupIntents::server(state.clone()))
.service(app::PaymentIntents::server(state.clone()))
.service(app::Refunds::server(state.clone()))
.service(app::Customers::server(state))
}
}