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:53 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
3b63af0a492ec1f360452a77126ec8c0e138269c
3b63af0a
2 parents
4c17a55d
7a70f0a8
Merge branch 'server' into web
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 @
3b63af0
...
...
@@ -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