homey-api 1.5.19 → 1.5.20
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.
|
@@ -9,6 +9,18 @@ class App extends Item {
|
|
|
9
9
|
path,
|
|
10
10
|
body,
|
|
11
11
|
}) {
|
|
12
|
+
if (typeof method !== 'string') {
|
|
13
|
+
throw new Error('Invalid Path');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (typeof path !== 'string') {
|
|
17
|
+
throw new Error('Invalid Path');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (!path.startsWith('/')) {
|
|
21
|
+
path = `/${path}`;
|
|
22
|
+
}
|
|
23
|
+
|
|
12
24
|
this.__debug(method, path);
|
|
13
25
|
|
|
14
26
|
return this.homey.call({
|