( workspaceId: string )
| 39 | } |
| 40 | |
| 41 | export async function getWorkspaceTier( |
| 42 | workspaceId: string |
| 43 | ): Promise<WorkspaceSubscriptionTier> { |
| 44 | const subscription = await prisma.workspaceSubscription.findFirst({ |
| 45 | where: { |
| 46 | workspaceId, |
| 47 | }, |
| 48 | }); |
| 49 | |
| 50 | return subscription?.tier ?? WorkspaceSubscriptionTier.FREE; |
| 51 | } |
| 52 | |
| 53 | const { get: isWorkspacePaused, del: clearWorkspacePausedStatus } = |
| 54 | buildQueryWithCache('workspacePaused', async (workspaceId: string) => { |
no outgoing calls
no test coverage detected