dev: add workspace slug to all requests

This commit is contained in:
pablohashescobar
2024-06-14 17:09:07 +05:30
parent 4d008240c5
commit 7d2e588481
3 changed files with 2 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ def member_sync_task(slug):
response = requests.patch(
f"{settings.PAYMENT_SERVER_BASE_URL}/api/workspaces/{workspace_id}/subscriptions/",
json={
"slug": slug,
"workspace_id": str(workspace_id),
"members_list": list(workspace_members),
},

View File

@@ -51,6 +51,7 @@ class PaymentLinkEndpoint(BaseAPIView):
f"{settings.PAYMENT_SERVER_BASE_URL}/api/payment-link/",
json={
"workspace_id": str(workspace.id),
"slug": slug,
"stripe_product_id": product_id,
"stripe_price_id": price_id,
"customer_email": request.user.email,

View File

@@ -26,11 +26,9 @@ class ProductEndpoint(BaseAPIView):
def get(self, request, slug):
try:
if settings.PAYMENT_SERVER_BASE_URL:
count = WorkspaceMember.objects.filter(
workspace__slug=slug
).count()
response = requests.get(
f"{settings.PAYMENT_SERVER_BASE_URL}/api/products/?quantity={count}",
headers={"content-type": "application/json"},