homebridge-tauron-elicznik 0.0.2-beta74 → 0.0.2-beta75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +0 -1
- package/package.json +1 -1
- package/src/tauronAuth.js +6 -4
package/index.js
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"displayName": "Tauron eLicznik",
|
3
3
|
"name": "homebridge-tauron-elicznik",
|
4
|
-
"version": "0.0.2-
|
4
|
+
"version": "0.0.2-beta75",
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to read data from Tauron eLicznik.",
|
6
6
|
"license": "MIT",
|
7
7
|
"author": "grzegorz914",
|
package/src/tauronAuth.js
CHANGED
@@ -10,23 +10,25 @@ class axiosTauronAuth {
|
|
10
10
|
}) {
|
11
11
|
this.username = data.username;
|
12
12
|
this.password = data.password;
|
13
|
+
this.service = data.service;
|
13
14
|
}
|
14
15
|
|
15
|
-
async request(
|
16
|
+
async request() {
|
16
17
|
try {
|
17
18
|
const data = {
|
18
19
|
username: this.username,
|
19
20
|
password: this.password,
|
20
|
-
service:
|
21
|
+
service: this.service
|
21
22
|
};
|
22
23
|
|
23
24
|
const options = {
|
24
25
|
data: data
|
25
26
|
};
|
26
27
|
const response = await axios.post(LOGIN_URL, options);
|
27
|
-
|
28
|
+
const returnUrl = response.data;
|
29
|
+
console.log('aaaaaaaaa', returnUrl);
|
28
30
|
|
29
|
-
return
|
31
|
+
return returnUrl;
|
30
32
|
} catch (err) {
|
31
33
|
return err
|
32
34
|
}
|