Remove some stripe proxy methods

This commit is contained in:
Jon Staab
2026-05-21 14:29:38 -07:00
parent e6cbfb361e
commit c02d834fe0
6 changed files with 23 additions and 33 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ pub async fn list_tenant_invoices(
let tenant = api.get_tenant_or_404(&pubkey).await?;
let invoices = api
.billing
.stripe_list_invoices(&tenant.stripe_customer_id)
.stripe
.list_invoices(&tenant.stripe_customer_id)
.await
.map_err(internal)?;
ok(invoices)
+2 -2
View File
@@ -25,8 +25,8 @@ pub async fn create_stripe_session(
let tenant = api.get_tenant_or_404(&pubkey).await?;
let url = api
.billing
.stripe_create_portal_session(&tenant.stripe_customer_id, params.return_url.as_deref())
.stripe
.create_portal_session(&tenant.stripe_customer_id, params.return_url.as_deref())
.await
.map_err(internal)?;
ok(serde_json::json!({ "url": url }))
+8 -2
View File
@@ -65,9 +65,15 @@ pub async fn create_tenant(
return ok(TenantResponse::from(t));
}
let display_name = api
.robot
.fetch_nostr_name(&pubkey)
.await
.unwrap_or(pubkey.chars().take(8).collect());
let stripe_customer_id = api
.billing
.stripe_create_customer(&pubkey)
.stripe
.create_customer(&pubkey, &display_name)
.await
.map_err(internal)?;