@@ -13,21 +13,21 @@ class CWaterPumpAPIImpl {
13
13
14
14
async start ( runTimeMs ) {
15
15
const { response : { data } , requestTime } = await this . _execute (
16
- async ( ) => await this . _client . get ( '/pour_tea' , { milliseconds : runTimeMs } )
16
+ async ( ) => await this . _client . get ( '/pour_tea' , { params : { milliseconds : runTimeMs } } )
17
17
) ;
18
18
return this . preprocessResponse ( { response : data , requestTime } ) ;
19
19
}
20
20
21
21
async stop ( ) {
22
22
const { response : { data } , requestTime } = await this . _execute (
23
- async ( ) => await this . _client . get ( '/stop' , { } )
23
+ async ( ) => await this . _client . get ( '/stop' , { params : { } } )
24
24
) ;
25
25
return this . preprocessResponse ( { response : data , requestTime } ) ;
26
26
}
27
27
28
28
async status ( ) {
29
29
const { response : { data } , requestTime } = await this . _execute (
30
- async ( ) => await this . _client . get ( '/status' , { } )
30
+ async ( ) => await this . _client . get ( '/status' , { params : { } } )
31
31
) ;
32
32
return this . preprocessResponse ( { response : data , requestTime } ) ;
33
33
}
@@ -36,7 +36,6 @@ class CWaterPumpAPIImpl {
36
36
preprocessResponse ( { response, requestTime } ) {
37
37
if ( null == response ) return null ;
38
38
if ( 'error' in response ) {
39
- // TODO: handle errors in slice/SystemStatus.js
40
39
throw new Error ( response . error ) ;
41
40
}
42
41
// make a deep copy of response
0 commit comments