feat: skip response transformation for WebSocket contexts in the transform interceptor.
This commit is contained in:
@@ -21,6 +21,11 @@ export class TransformInterceptor<T>
|
|||||||
context: ExecutionContext,
|
context: ExecutionContext,
|
||||||
next: CallHandler,
|
next: CallHandler,
|
||||||
): Observable<Response<T>> {
|
): Observable<Response<T>> {
|
||||||
|
// Skip wrapping for WebSocket contexts - gateway handlers return raw data
|
||||||
|
if (context.getType() === 'ws') {
|
||||||
|
return next.handle();
|
||||||
|
}
|
||||||
|
|
||||||
return next.handle().pipe(
|
return next.handle().pipe(
|
||||||
map((data) => ({
|
map((data) => ({
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user