我有一个带有Web套接字的多租户应用程序,该应用程序最初用于使用Scope.Request来验证连接时套接字中的用户,但是我如何获得对模块的请求
async handleConnection(socket: Socket) {
const contextId = ContextIdFactory.getByRequest(???);
const userService = await this.moduleRef.resolve(
UsersService,
contextId,
{ strict: false },
);
}
我的用户服务
@Injectable({ scope: Scope.REQUEST })
export class UsersService {
}