We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2759c94 commit af8f263Copy full SHA for af8f263
src/mixins/getHomepage.js
@@ -12,17 +12,27 @@ module.exports = {
12
uri: `/v2/homepage`,
13
});
14
15
+ const response = await this.makeRequest({
16
+ method: "post",
17
+ uri: `/v2/homepage`,
18
+ body: {
19
+ getFamily: {},
20
+ getThing: {},
21
+ },
22
+ });
23
+
24
const error = _get(response, 'error', false);
- const data = _get(response, 'data', false);
25
+ const familyInfo = _get(response, 'familyInfo', false);
26
+ const thingInfo = _get(response, 'thingInfo', false);
27
28
if (error) {
29
throw new Error(`[${error}] ${errors[error]}`);
30
}
31
- if (!data) {
32
+ if (!familyInfo || !thingInfo) {
33
throw new Error(`${errors.noDevices}`);
34
35
- return data
36
+ return { familyInfo, thingInfo };
37
},
38
};
0 commit comments