Skip to content

Commit e4abbbf

Browse files
fix: include orgs with a paid plan in billing dropdown (#2237)
The billing org filter only checked canPay, so Team/Enterprise orgs without prepaid credits were hidden. The Hub inference widget uses org.plan || canPay, and the plan field is already returned by /oauth/userinfo. Match that behavior here.
1 parent 7d64d42 commit e4abbbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/api/v2/user/billing-orgs/+server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const GET: RequestHandler = async ({ locals }) => {
3434
const currentBillingOrg = settings?.billingOrganization;
3535

3636
const billingOrgs = (data.orgs ?? [])
37-
.filter((org: { canPay?: boolean }) => org.canPay === true)
37+
.filter((org: { canPay?: boolean; plan?: string }) => org.plan || org.canPay === true)
3838
.map((org: { sub: string; name: string; preferred_username: string }) => ({
3939
sub: org.sub,
4040
name: org.name,

0 commit comments

Comments
 (0)