Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 25 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* |
||
27 | const SipAPI= { |
||
|
|||
28 | /** |
||
29 | * Get SIP password for selected extension. |
||
30 | * @param {string} number - The number of the extension. |
||
31 | * @param {function} callback - The callback function |
||
32 | */ |
||
33 | getSecret( number, callback) { |
||
34 | let secret = ''; |
||
35 | $.api({ |
||
36 | url: PbxApi.sipGetSecret, |
||
37 | on: 'now', |
||
38 | urlData: { |
||
39 | number: number |
||
40 | }, |
||
41 | successTest: PbxApi.successTest, |
||
42 | onSuccess(response) { |
||
43 | callback(response); |
||
44 | }, |
||
45 | onFailure(response) { |
||
46 | callback(response); |
||
47 | }, |
||
48 | }); |
||
49 | return secret; |
||
50 | }, |
||
51 | } |