Spaces:
Paused
Paused
Download apps/prevision-api/src/subscriptions/active-subscription.ts from modventures/prevision: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/src/subscriptions/active-subscription.ts
- Command line
-
hf download hf://spaces/modventures/prevision/apps/prevision-api/src/subscriptions/active-subscription.ts
-
curl -L -o active-subscription.ts https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/src/subscriptions/active-subscription.ts
323 Bytes
| import { Prisma } from '../generated/prisma/client.js'; | |
| /** A subscription that currently grants its plan's allowance. */ | |
| export const activeSubscriptionWhere = (userId: string, now = new Date()): Prisma.SubscriptionWhereInput => ({ | |
| userId, | |
| status: { in: ['active', 'trialing'] }, | |
| currentPeriodEnd: { gt: now }, | |
| }); | |