Merge pull request #2615 from appwrite/fix-organization-billing

This commit is contained in:
Darshan authored and GitHub committed 2025-11-19 13:53:34 +05:30
commit 6b3409d7f6
9 files changed
+49 -54

No files matched your search

+42 -42
View File
@@ -1,49 +1,49 @@
name: Dockerize Profiles
on:
push:
branches: [feat-profiles]
pull_request:
types: [opened, synchronize, reopened]
branches: [feat-profiles]
workflow_dispatch:
push:
branches: [feat-profiles]
pull_request:
types: [opened, synchronize, reopened]
branches: [feat-profiles]
workflow_dispatch:
jobs:
dockerize-profiles:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerize-profiles:
runs-on: ubuntu-latest
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: appwrite/console-profiles
tags: |
type=ref,event=branch,prefix=branch-
type=ref,event=pr
type=sha,prefix=sha-
type=raw,value=gh-${{ github.run_id}}
flavor: |
latest=false
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: appwrite/console-profiles
tags: |
type=ref,event=branch,prefix=branch-
type=ref,event=pr
type=sha,prefix=sha-
type=raw,value=gh-${{ github.run_id}}
flavor: |
latest=false
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+2 -1
View File
@@ -490,7 +490,7 @@ export class Billing {
name: string,
billingPlan: string,
paymentMethodId: string,
billingAddressId: string = null,
billingAddressId: string = undefined,
couponId: string = null,
invites: Array<string> = [],
budget: number = undefined,
@@ -628,6 +628,7 @@ export class Billing {
budget,
taxId
};
const uri = new URL(this.client.config.endpoint + path);
return await this.client.call(
'patch',
@@ -134,7 +134,7 @@
name,
billingPlan,
paymentMethodId,
null,
undefined,
couponData.code ? couponData.code : null,
collaborators,
billingBudget,
@@ -148,7 +148,7 @@
selectedOrg.$id,
billingPlan,
paymentMethodId,
null,
undefined,
couponData.code ? couponData.code : null,
collaborators
);
@@ -112,7 +112,6 @@
ID.unique(),
name,
BillingPlan.FREE,
null,
null
);
} else {
@@ -121,7 +120,7 @@
name,
selectedPlan,
paymentMethodId,
null,
undefined,
selectedCoupon?.code,
collaborators,
billingBudget,
@@ -25,7 +25,6 @@
ID.unique(),
organizationName,
BillingPlan.FREE,
null,
null
);
@@ -29,7 +29,6 @@ export const load: PageLoad = async ({ parent }) => {
ID.unique(),
'Personal projects',
BillingPlan.FREE,
null,
null
);
trackEvent(Submit.OrganizationCreate, {
@@ -173,8 +173,7 @@
await sdk.forConsole.billing.updatePlan(
data.organization.$id,
selectedPlan,
paymentMethodId,
null
paymentMethodId
);
// 2) If the target plan has a project limit, apply selected projects now
@@ -254,7 +253,7 @@
data.organization.$id,
selectedPlan,
paymentMethodId,
null,
undefined,
selectedCoupon?.code,
newCollaborators,
billingBudget,
@@ -78,7 +78,6 @@ export const load: PageLoad = async ({ parent, url }) => {
ID.unique(),
'Personal Projects',
BillingPlan.FREE,
null,
null
);
} else {
@@ -49,7 +49,6 @@ export const load = async ({ parent, url, params }) => {
ID.unique(),
'Personal project',
BillingPlan.FREE,
null,
null
);
}