fix: API errors for Stripe
All checks were successful
Deploy to Staging / Build Images (push) Successful in 3m47s
Deploy to Staging / Deploy to Staging (push) Successful in 49s
Deploy to Staging / Verify Staging (push) Successful in 9s
Deploy to Staging / Notify Staging Ready (push) Successful in 9s
Deploy to Staging / Notify Staging Failure (push) Has been skipped

This commit is contained in:
Eric Gullickson
2026-02-15 21:12:15 -06:00
parent bb4d2b9699
commit c1e8807bda

View File

@@ -929,7 +929,7 @@ export class SubscriptionsService {
async getInvoices(userId: string): Promise<any[]> {
try {
const subscription = await this.repository.findByUserId(userId);
if (!subscription?.stripeCustomerId) {
if (!subscription?.stripeCustomerId || subscription.stripeCustomerId.startsWith('admin_override_')) {
return [];
}
return this.stripeClient.listInvoices(subscription.stripeCustomerId);