websocket中的范围请求

时间:2020-03-16 11:59:22

标签: nestjs

我有一个带有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 {
}

0 个答案:

没有答案