homebridge-tauron-elicznik 0.0.2-beta62 → 0.0.2-beta63
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +1 -2
- package/package.json +1 -1
- package/src/tauronAuth.js +3 -3
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-beta63",
|
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
@@ -2,6 +2,7 @@
|
|
2
2
|
const axios = require('axios');
|
3
3
|
|
4
4
|
const LOGIN_URL = 'https://logowanie.tauron-dystrybucja.pl/login?service=https://elicznik.tauron-dystrybucja.pl';
|
5
|
+
const SERVICE_URL = 'https://elicznik.tauron-dystrybucja.pl';
|
5
6
|
|
6
7
|
class axiosTauronAuth {
|
7
8
|
constructor({
|
@@ -9,7 +10,6 @@ class axiosTauronAuth {
|
|
9
10
|
}) {
|
10
11
|
this.username = data.username;
|
11
12
|
this.password = data.password;
|
12
|
-
this.service = data.service;
|
13
13
|
}
|
14
14
|
|
15
15
|
async request() {
|
@@ -17,7 +17,7 @@ class axiosTauronAuth {
|
|
17
17
|
const data = {
|
18
18
|
username: this.username,
|
19
19
|
password: this.password,
|
20
|
-
service:
|
20
|
+
service: SERVICE_URL
|
21
21
|
};
|
22
22
|
|
23
23
|
const options = {
|
@@ -25,7 +25,7 @@ class axiosTauronAuth {
|
|
25
25
|
data: data
|
26
26
|
};
|
27
27
|
const response = await axios.post(options);
|
28
|
-
console.log(response)
|
28
|
+
console.log(response);
|
29
29
|
return response;
|
30
30
|
} catch (err) {
|
31
31
|
return err
|