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-05-16 15:26:08 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
391540214461fee362dd43c6d3b4764c12c03dc0
39154021
1 parent
09f021ae
feat. bottle register : include dosage register
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
server/src/api/bottle/bottle.ctrl.js
server/src/api/bottle/bottle.ctrl.js
View file @
3915402
...
...
@@ -132,7 +132,7 @@ exports.setMedicine = async(ctx) => {
const
{
userId
}
=
jwt
.
verify
(
token
,
process
.
env
.
JWT_SECRET
);
const
{
bottleId
}
=
ctx
.
params
;
const
{
medicineId
}
=
ctx
.
request
.
body
;
const
{
medicineId
,
dosage
}
=
ctx
.
request
.
body
;
const
bottle
=
await
Bottle
.
findByBottleId
(
bottleId
);
if
(
!
bottle
)
{
...
...
@@ -154,7 +154,10 @@ exports.setMedicine = async(ctx) => {
await
Bottle
.
findOneAndUpdate
({
bottleId
},
{
medicineId
});
},
{
medicineId
,
dosage
});
ctx
.
status
=
200
;
}
...
...
Please
register
or
login
to post a comment