CodeZettaInterview Hub

NestJS · Controllers · Mid-Level · Architecture

When should logic leave the controller?

Short Interview Answer

As soon as there are rules, transactions, multi-step orchestration, or non-trivial mapping.

Detailed Explanation

Controllers that call three services and implement policy become untestable. Use application services/use-cases.

Did you know this answer?