homebridge-tauron-elicznik 0.0.2-beta67 → 0.0.2-beta68
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +2 -1
- package/package.json +1 -1
- package/src/tauronAuth.js +6 -2
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-beta68",
|
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
@@ -11,13 +11,15 @@ class axiosTauronAuth {
|
|
11
11
|
this.log = data.log;
|
12
12
|
this.username = data.username;
|
13
13
|
this.password = data.password;
|
14
|
+
this.service = data.service;
|
14
15
|
}
|
15
16
|
|
16
|
-
async request() {
|
17
|
+
async request(returnUrl) {
|
17
18
|
try {
|
18
19
|
const data = {
|
19
20
|
username: this.username,
|
20
|
-
password: this.password
|
21
|
+
password: this.password,
|
22
|
+
service: this.service
|
21
23
|
};
|
22
24
|
|
23
25
|
const options = {
|
@@ -26,6 +28,8 @@ class axiosTauronAuth {
|
|
26
28
|
};
|
27
29
|
const response = await axios.post(options);
|
28
30
|
this.log(response.data);
|
31
|
+
returnUrl.url = response.data;
|
32
|
+
|
29
33
|
return response.data;
|
30
34
|
} catch (err) {
|
31
35
|
return err
|