Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-08-20 19:35:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7a70f0a85aff8a40c4f0187089ded9dddbe8b67d
7a70f0a8
1 parent
b6fefa67
feat. get doctor req return type edit
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
server/src/api/user/user.ctrl.js
server/src/api/user/user.ctrl.js
View file @
7a70f0a
...
...
@@ -106,11 +106,25 @@ exports.viewAllDoctorRegisterReq = async ctx => {
return
;
}
const
patientInfoList
=
await
PatientInfo
.
findAllByPatientIdAndUseYn
(
userId
,
'W'
);
const
patientInfoList
=
await
PatientInfo
.
find
({
patientId
:
userId
,
useYn
:
'W'
,
})
const
doctorReqList
=
await
Promise
.
all
(
patientInfoList
.
map
(
async
patientInfo
=>
{
const
doctor
=
await
DoctorInfo
.
findOne
({
doctorId
:
patientInfo
.
doctorId
});
return
{
patientId
:
patientInfo
.
patientId
,
doctorId
:
patientInfo
.
doctorId
,
useYn
:
patientInfo
.
useYn
,
info
:
patientInfo
.
info
,
doctorNm
:
doctor
.
info
.
doctorNm
,
}
}));
ctx
.
status
=
200
;
ctx
.
body
=
{
patientInfo
List
,
doctorReq
List
,
};
};
...
...
Please
register
or
login
to post a comment