Architecture Track • Advanced • 5 mins review
Refactor: Simplify Tenant activation flow
Moves tenant 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 tenant activation path touches the database, billing state, and downstream notifications, and the team wanted it easier to trace.
Changed Files (2)
- src/controllers/TenantActivationController.ts +16 -4
- src/events/TenantActivatedConsumer.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