MCPcopy
hub / github.com/msgbyte/tianji / getWorkspaceTier

Function getWorkspaceTier

src/server/model/billing/workspace.ts:41–51  ·  view source on GitHub ↗
(
  workspaceId: string
)

Source from the content-addressed store, hash-verified

39}
40
41export 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
53const { get: isWorkspacePaused, del: clearWorkspacePausedStatus } =
54 buildQueryWithCache('workspacePaused', async (workspaceId: string) => {

Callers 3

checkCreditFunction · 0.85
billing.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected