Skip to content

Commit e45c29f

Browse files
committed
患者症状APIのpostを叩く部分を修正
1 parent 3c97ee6 commit e45c29f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

services/UserService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class UserService {
2828
return JSON.parse(payload)['cognito:username']
2929
}
3030

31-
async postStatus(status: ConsumeStatus) {
31+
async postStatus(patientId: string, status: ConsumeStatus) {
3232
const response = await $axios.post(
33-
`patients/${this.getUserId()}/statuses`,
33+
`patients/${patientId}/statuses`,
3434
status,
3535
{
3636
headers: authHeader(),

store/modules/statuses.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class StatusesModule extends VuexModule {
5858
}
5959

6060
@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(
6363
(status) => {
6464
this.context.commit('pushStatus', status)
6565
return Promise.resolve(status)

types/component-interfaces/status.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface Status {
1818
}
1919
}
2020
export interface ConsumeStatus {
21+
created: string
2122
SpO2: number
2223
body_temperature: number
2324
pulse: number

0 commit comments

Comments
 (0)