homebridge-melcloud-control 4.0.0-beta.378 → 4.0.0-beta.379
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/package.json +1 -1
- package/src/melcloudhometoken.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.379",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/melcloudhometoken.js
CHANGED
|
@@ -45,12 +45,12 @@ class MelCloudHomeToken extends EventEmitter {
|
|
|
45
45
|
const tokenData = new URLSearchParams({
|
|
46
46
|
grant_type: 'authorization_code',
|
|
47
47
|
code: code,
|
|
48
|
-
redirect_uri:
|
|
48
|
+
redirect_uri: this.redirectUrl,
|
|
49
49
|
client_id: CLIENT_ID,
|
|
50
50
|
code_verifier: codeVerifier,
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
const tokenResponse = await this.client.post(
|
|
53
|
+
const tokenResponse = await this.client.post(TOKEN_ENDPOINT, tokenData.toString(), {
|
|
54
54
|
headers: {
|
|
55
55
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
56
56
|
'Authorization': 'Basic aG9tZW1vYmlsZTo=',
|