fix(server): separate active subscriptions (#13077)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved accuracy of subscription management by ensuring only active
or trialing subscriptions are considered in all relevant user,
workspace, and license actions.
* Enhanced consistency in subscription retrieval for workspace member
updates and subscription-related operations.

* **Refactor**
* Updated internal subscription retrieval methods to distinguish between
general and active subscriptions for more precise handling across the
app.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Yii
2025-07-08 11:02:08 +08:00
committed by GitHub
parent b9b336f728
commit 61da63a4a0
7 changed files with 40 additions and 8 deletions
@@ -528,7 +528,7 @@ export class WorkspaceSubscriptionResolver {
description: 'The team subscription of the workspace, if exists.',
})
async subscription(@Parent() workspace: WorkspaceType) {
return this.service.getSubscription({
return this.service.getActiveSubscription({
plan: SubscriptionPlan.Team,
workspaceId: workspace.id,
});