homebridge-tauron-elicznik 0.0.2-beta67 → 0.0.2-beta68

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