Conversation
|
@Xaxxoo is attempting to deploy a commit to the olufunbiik's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces a complete subscription management system enabling artists to create and manage subscription tiers and fans to subscribe to them. It includes DTOs for request validation, TypeORM entities with relationships, JWT authentication via a Changes
Sequence DiagramsequenceDiagram
participant Client
participant Controller as SubscriptionsController
participant Guard as AuthGuard<br/>(wallet-jwt)
participant Strategy as WalletStrategy
participant Service as SubscriptionsService
participant Repo as FanSubscription<br/>Repository
Client->>Guard: POST /subscription-tiers/:tierId/subscribe<br/>Bearer Token
Guard->>Strategy: Extract & validate JWT
Strategy->>Strategy: Verify signature & expiry
Strategy->>Strategy: Resolve artistId from db<br/>(if user is artist)
Strategy-->>Guard: AuthenticatedPrincipal<br/>{id, walletAddress, roles}
Guard-->>Controller: req.user = principal
Controller->>Service: subscribe(tierId, dto,<br/>principal)
Service->>Service: Verify tier exists<br/>& is active
Service->>Service: Check no active<br/>subscription exists<br/>for (fanUserId, tierId)
Service->>Repo: Save new FanSubscription<br/>{fanUserId: principal.id,<br/>tierId, status: PENDING,<br/>paymentTxId, expiresAt}
Repo-->>Service: FanSubscription created
Service-->>Controller: FanSubscription
Controller-->>Client: 201 Created<br/>FanSubscription
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #345
Summary by CodeRabbit