mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
add route
This commit is contained in:
1 parent
463613735f
commit
7ee89b28ee
2 files changed
+7
-2
No files matched your search
+2
-2
@@ -32,7 +32,7 @@ use user_traits_component::traits::internal_session_cache_purge::InternalSession
|
||||
// #[utoipa::path(
|
||||
// get,
|
||||
// tag = "Stripe (Artcraft)",
|
||||
// path = "/v1/stripe_artcraft/user_signup/subscription_checkout",
|
||||
// path = "/v1/stripe_artcraft/user_signup_subscription_checkout",
|
||||
// params(
|
||||
// ("request" = CreateCheckoutSessionRequest, description = "Payload for Request"),
|
||||
// ),
|
||||
@@ -43,7 +43,7 @@ use user_traits_component::traits::internal_session_cache_purge::InternalSession
|
||||
|
||||
/// Create a Stripe Checkout session *with* user signup and return the redirect URL in Json.
|
||||
/// If the user is already logged in, we just attach it to that record instead.
|
||||
pub async fn stripe_artcraft_create_checkout_with_user_signup_handler(
|
||||
pub async fn stripe_artcraft_create_subscription_checkout_with_user_signup_handler(
|
||||
http_request: HttpRequest,
|
||||
request: Json<StripeArtcraftCreateSubscriptionCheckoutWithUserSignupRequest>,
|
||||
stripe_config: Data<ArtcraftStripeConfigWithClient>,
|
||||
|
||||
+5
@@ -4,6 +4,7 @@ use actix_web::dev::{ServiceRequest, ServiceResponse};
|
||||
use actix_web::{web, App, Error, HttpResponse};
|
||||
use billing_artcraft_component::endpoints::checkout::stripe_artcraft_create_credits_pack_checkout_handler::stripe_artcraft_create_credits_pack_checkout_handler;
|
||||
use billing_artcraft_component::endpoints::checkout::stripe_artcraft_create_subscription_checkout_handler::stripe_artcraft_create_subscription_session_handler;
|
||||
use billing_artcraft_component::endpoints::checkout_with_user_signup::stripe_artcraft_create_subscription_checkout_with_user_signup_handler::stripe_artcraft_create_subscription_checkout_with_user_signup_handler;
|
||||
use billing_artcraft_component::endpoints::customer_portal::stripe_artcraft_customer_portal_cancel_plan_handler::stripe_artcraft_customer_portal_cancel_plan_handler;
|
||||
use billing_artcraft_component::endpoints::customer_portal::stripe_artcraft_customer_portal_manage_plan_handler::stripe_artcraft_customer_portal_manage_plan_handler;
|
||||
use billing_artcraft_component::endpoints::customer_portal::stripe_artcraft_customer_portal_switch_plan_handler::stripe_artcraft_customer_portal_switch_plan_handler;
|
||||
@@ -50,5 +51,9 @@ where
|
||||
.route(web::post().to(stripe_artcraft_customer_portal_update_payment_method_handler))
|
||||
.route(web::head().to(|| HttpResponse::Ok()))
|
||||
)
|
||||
.service(web::resource("/user_signup_subscription_checkout")
|
||||
.route(web::post().to(stripe_artcraft_create_subscription_checkout_with_user_signup_handler))
|
||||
.route(web::head().to(|| HttpResponse::Ok()))
|
||||
)
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user