Team Ai
Apppublic

oex2003/evolution-api

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
label.controller.ts16 linesDownload Raw Back to controllers
1import { InstanceDto } from '@api/dto/instance.dto';2import { HandleLabelDto } from '@api/dto/label.dto';3import { WAMonitoringService } from '@api/services/monitor.service';4 5export class LabelController {6  constructor(private readonly waMonitor: WAMonitoringService) {}7 8  public async fetchLabels({ instanceName }: InstanceDto) {9    return await this.waMonitor.waInstances[instanceName].fetchLabels();10  }11 12  public async handleLabel({ instanceName }: InstanceDto, data: HandleLabelDto) {13    return await this.waMonitor.waInstances[instanceName].handleLabel(data);14  }15}16