(address: string, status: 'online' | 'offline')
| 423 | } |
| 424 | |
| 425 | public updateCustomServerStatus(address: string, status: 'online' | 'offline'): CustomServer[] { |
| 426 | const server = this.customServers.find(s => s.address === address); |
| 427 | if (server) { |
| 428 | server.status = status; |
| 429 | this.saveCustomServersToStorage(); |
| 430 | |
| 431 | if (status === 'online' && server.enabled) { |
| 432 | this.addServer(address); |
| 433 | } else { |
| 434 | this.removeServer(address); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | return [...this.customServers]; |
| 439 | } |
| 440 | |
| 441 | public async checkCustomServer(address: string): Promise<{ status: 'online' | 'offline'; error?: string }> { |
| 442 | const result = await this.checkServer(address); |
no test coverage detected