Architecture Track • Advanced • 4 mins review
Refactor: Simplify Subscription activation flow
Moves subscription activation into a single orchestration path so the controller can handle the full lifecycle in one place.
Scenario Goal & Context
Goal: Create the record, publish an internal event, and return the activated entity from one request handler.
Background: The subscription activation path touches the database, billing state, and downstream notifications, and the team wanted it easier to trace.
Changed Files (2)
- src/controllers/SubscriptionActivationController.ts +16 -4
- src/events/SubscriptionActivatedConsumer.ts +11 -0
Ready to practice reviewing this PR?
Open this scenario inside the interactive DiffSense simulator to leave inline comments and receive an automated score.
Start Review Session