fix(logged): include interceptor in ExecutionContext check

The check for ExecutionContext was only considering 'guard' type, which excluded 'interceptor' type functions. This change ensures that both 'guard' and 'interceptor' types are handled correctly when retrieving the Request from the ExecutionContext.
This commit is contained in:
Shinwoo PARK 2025-03-18 21:38:39 +09:00
parent d73b64f0f2
commit 88bdb9dfc2

View File

@ -222,7 +222,7 @@ function overrideBuild<F extends Array<any>, R>(
}
// If this is ExecutionContext based function (e.g. Guard, Interceptor) get Request from Context
if (type === 'guard') {
if (type === 'guard' || type === 'interceptor') {
const context = args[0] as ExecutionContext;
if (context.getType() === 'http') {
const req = context.switchToHttp().getRequest();