mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-02 08:46:38 +00:00
use billing org id in get subscription status
This commit is contained in:
@@ -112,11 +112,13 @@ export async function getOrgSubscriptionsData(
|
|||||||
throw new Error(`Not found`);
|
throw new Error(`Not found`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const billingOrgId = org[0].billingOrgId || org[0].orgId;
|
||||||
|
|
||||||
// Get customer for org
|
// Get customer for org
|
||||||
const customer = await db
|
const customer = await db
|
||||||
.select()
|
.select()
|
||||||
.from(customers)
|
.from(customers)
|
||||||
.where(eq(customers.orgId, orgId))
|
.where(eq(customers.orgId, billingOrgId))
|
||||||
.limit(1);
|
.limit(1);
|
||||||
|
|
||||||
const subscriptionsWithItems: Array<{
|
const subscriptionsWithItems: Array<{
|
||||||
|
|||||||
Reference in New Issue
Block a user