MCPcopy Create free account
hub / github.com/FreeMovieIR/freemovieir.github.io / getCurrentKey

Method getCurrentKey

apiKeySwitcher.js:8–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 2

switchToNextKeyMethod · 0.95
fetchWithKeySwitchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected