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 CHANGED
@@ -136,8 +136,7 @@ class eLicznikDevice {
136
136
 
137
137
  const data = {
138
138
  username: this.user,
139
- password: this.passwd,
140
- service: SERVICE_URL
139
+ password: this.passwd
141
140
  };
142
141
 
143
142
 
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-beta62",
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: this.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