diff --git a/src/community/services/community.service.ts b/src/community/services/community.service.ts index af76894..e3d1560 100644 --- a/src/community/services/community.service.ts +++ b/src/community/services/community.service.ts @@ -1,25 +1,10 @@ import { Injectable, HttpException, HttpStatus } from '@nestjs/common'; -import { TuyaContext } from '@tuya/tuya-connector-nodejs'; -import { ConfigService } from '@nestjs/config'; import { SpaceRepository } from '@app/common/modules/space/repositories'; import { AddCommunityDto } from '../dtos'; @Injectable() export class CommunityService { - private tuya: TuyaContext; - constructor( - private readonly configService: ConfigService, - private readonly spaceRepository: SpaceRepository, - ) { - const accessKey = this.configService.get('auth-config.ACCESS_KEY'); - const secretKey = this.configService.get('auth-config.SECRET_KEY'); - // const clientId = this.configService.get('auth-config.CLIENT_ID'); - this.tuya = new TuyaContext({ - baseUrl: 'https://openapi.tuyaeu.com', - accessKey, - secretKey, - }); - } + constructor(private readonly spaceRepository: SpaceRepository) {} async addCommunity(addCommunityDto: AddCommunityDto) { try {