mirror of
https://github.com/makeplane/plane.git
synced 2025-12-29 00:24:56 +01:00
dev: add workspace slug to all requests
This commit is contained in:
@@ -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),
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user