Download src/api/controllers/label.controller.ts from usofn8n/Evo: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/usofn8n/Evo/resolve/main/src/api/controllers/label.controller.ts
- Command line
-
hf download hf://spaces/usofn8n/Evo/src/api/controllers/label.controller.ts
-
curl -L -o label.controller.ts https://huggingface.co/spaces/usofn8n/Evo/resolve/main/src/api/controllers/label.controller.ts
577 Bytes
| import { InstanceDto } from '@api/dto/instance.dto'; | |
| import { HandleLabelDto } from '@api/dto/label.dto'; | |
| import { WAMonitoringService } from '@api/services/monitor.service'; | |
| export class LabelController { | |
| constructor(private readonly waMonitor: WAMonitoringService) {} | |
| public async fetchLabels({ instanceName }: InstanceDto) { | |
| return await this.waMonitor.waInstances[instanceName].fetchLabels(); | |
| } | |
| public async handleLabel({ instanceName }: InstanceDto, data: HandleLabelDto) { | |
| return await this.waMonitor.waInstances[instanceName].handleLabel(data); | |
| } | |
| } | |