()
| 6 | } |
| 7 | |
| 8 | getCurrentKey() { |
| 9 | if (this.userToken) { |
| 10 | console.log('استفاده از توکن کاربر:', this.userToken); |
| 11 | return this.userToken; // اولویت با توکن کاربر |
| 12 | } |
| 13 | if (this.keys.length === 0) { |
| 14 | throw new Error('هیچ کلید API در دسترس نیست.'); |
| 15 | } |
| 16 | return this.keys[this.currentIndex]; |
| 17 | } |
| 18 | |
| 19 | switchToNextKey() { |
| 20 | if (this.userToken) { |
no outgoing calls
no test coverage detected