homebridge-melcloud-control 4.0.0-beta.301 → 4.0.0-beta.303
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 -3
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.303",
|
|
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
|
@@ -85,9 +85,8 @@ class MelCloudHomeToken {
|
|
|
85
85
|
code_verifier: pkce.verifier,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
const res = await axios({
|
|
88
|
+
const res = await axios(TOKEN_ENDPOINT, {
|
|
89
89
|
method: 'POST',
|
|
90
|
-
baseURL: TOKEN_ENDPOINT,
|
|
91
90
|
headers: {
|
|
92
91
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
93
92
|
'Content-Length': tokenData.toString().length,
|
|
@@ -96,7 +95,7 @@ class MelCloudHomeToken {
|
|
|
96
95
|
data: tokenData,
|
|
97
96
|
timeout: 10000
|
|
98
97
|
});
|
|
99
|
-
|
|
98
|
+
console.log(res);
|
|
100
99
|
if (res.status !== 200) {
|
|
101
100
|
throw new Error(`Token exchange failed: ${res.status} ${res.statusText}`);
|
|
102
101
|
}
|