homebridge-melcloud-control 3.3.31 → 3.3.32-beta.0
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/CHANGELOG.md +6 -0
- package/homebridge-ui/server.js +2 -2
- package/index.js +15 -15
- package/package.json +1 -1
- package/src/deviceata.js +80 -80
- package/src/deviceatw.js +112 -112
- package/src/deviceerv.js +53 -53
- package/src/impulsegenerator.js +2 -2
- package/src/melcloud.js +20 -20
- package/src/melcloudata.js +12 -12
- package/src/melcloudatw.js +12 -12
- package/src/melclouderv.js +12 -12
- package/src/mqtt.js +4 -4
- package/src/restful.js +4 -4
package/src/restful.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import express, { json } from 'express';
|
|
3
|
+
import EventEmitter from 'events';
|
|
4
4
|
|
|
5
5
|
class RestFul extends EventEmitter {
|
|
6
6
|
constructor(config) {
|
|
@@ -20,7 +20,7 @@ class RestFul extends EventEmitter {
|
|
|
20
20
|
try {
|
|
21
21
|
const restFul = express();
|
|
22
22
|
restFul.set('json spaces', 2);
|
|
23
|
-
restFul.use(
|
|
23
|
+
restFul.use(json());
|
|
24
24
|
restFul.get('/info', (req, res) => { res.json(this.restFulData.info) });
|
|
25
25
|
restFul.get('/state', (req, res) => { res.json(this.restFulData.state) });
|
|
26
26
|
|
|
@@ -62,4 +62,4 @@ class RestFul extends EventEmitter {
|
|
|
62
62
|
const emitDebug = this.restFulDebug ? this.emit('debug', `RESTFul update path: ${path}, data: ${data}`) : false;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
export default RestFul;
|