File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
types/component-interfaces Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ class UserService {
28
28
return JSON . parse ( payload ) [ 'cognito:username' ]
29
29
}
30
30
31
- async postStatus ( status : ConsumeStatus ) {
31
+ async postStatus ( patientId : string , status : ConsumeStatus ) {
32
32
const response = await $axios . post (
33
- `patients/${ this . getUserId ( ) } /statuses` ,
33
+ `patients/${ patientId } /statuses` ,
34
34
status ,
35
35
{
36
36
headers : authHeader ( ) ,
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ class StatusesModule extends VuexModule {
58
58
}
59
59
60
60
@Action ( { rawError : true } )
61
- create ( status : ConsumeStatus ) : Promise < Status > {
62
- return UserService . postStatus ( status ) . then (
61
+ create ( item : { patientId : string ; status : ConsumeStatus } ) : Promise < Status > {
62
+ return UserService . postStatus ( item . patientId , item . status ) . then (
63
63
( status ) => {
64
64
this . context . commit ( 'pushStatus' , status )
65
65
return Promise . resolve ( status )
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export interface Status {
18
18
}
19
19
}
20
20
export interface ConsumeStatus {
21
+ created : string
21
22
SpO2 : number
22
23
body_temperature : number
23
24
pulse : number
You can’t perform that action at this time.
0 commit comments