Nestjs websocket中的作用域请求

Nestjs websocket中的作用域请求,nestjs,Nestjs,我有一个带有web套接字的多租户应用程序,它最初是用来使用作用域的。请求在连接时验证套接字中的用户,但我如何才能获得模块的请求 异步handleConnection(套接字:套接字){ const contextId=ContextIdFactory.getByRequest(??); const userService=等待this.moduleRef.resolve( 用户服务, 上下文ID, {strict:false}, ); } 我的用户服务 @Injectable({scope:

我有一个带有web套接字的多租户应用程序,它最初是用来使用作用域的。请求在连接时验证套接字中的用户,但我如何才能获得模块的请求


异步handleConnection(套接字:套接字){
const contextId=ContextIdFactory.getByRequest(??);
const userService=等待this.moduleRef.resolve(
用户服务,
上下文ID,
{strict:false},
);
}
我的用户服务

@Injectable({scope:scope.REQUEST})
导出类用户服务{
}