(instance: InstanceDto)
| 17 | } |
| 18 | |
| 19 | public async find(instance: InstanceDto): Promise<Proxy> { |
| 20 | try { |
| 21 | const result = await this.waMonitor.waInstances[instance.instanceName].findProxy(); |
| 22 | |
| 23 | if (Object.keys(result).length === 0) { |
| 24 | throw new Error('Proxy not found'); |
| 25 | } |
| 26 | |
| 27 | return result; |
| 28 | } catch { |
| 29 | return null; |
| 30 | } |
| 31 | } |
| 32 | } |