fix: handle billingSubscriptions gql field if billing is disabled (#9767)
Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
This commit is contained in:
@ -167,6 +167,10 @@ export class WorkspaceResolver {
|
||||
async billingSubscriptions(
|
||||
@Parent() workspace: Workspace,
|
||||
): Promise<BillingSubscription[] | undefined> {
|
||||
if (!this.environmentService.get('IS_BILLING_ENABLED')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
return this.billingSubscriptionRepository.find({
|
||||
where: { workspaceId: workspace.id },
|
||||
|
||||
Reference in New Issue
Block a user