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
You need to sign in or sign up before continuing.
Authored by
박권수
2021-05-09 03:20:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2373c08d15dcda12897b0c1530a0d869f5188ad9
2373c08d
1 parent
084076f7
feat. bottle extra logic
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
server/src/api/bottle/bottle.ctrl.js
server/src/api/bottle/index.js
server/src/api/bottle/bottle.ctrl.js
View file @
2373c08
...
...
@@ -23,6 +23,17 @@ exports.lookupInfo = async(ctx) => {
}
}
//약병의 ID를 찾아서 약의 정보를 등록 : Post
exports
.
setMedicine
=
async
(
ctx
)
=>
{
const
{
medicineId
,
bottleId
}
=
ctx
.
request
.
body
;
await
Bottle
.
findOneAndUpdate
({
bottleId
},
{
medicineId
});
ctx
.
status
=
200
;
}
const
dataRequest
=
()
=>
{
return
'dataRequest'
}
...
...
server/src/api/bottle/index.js
View file @
2373c08
...
...
@@ -4,5 +4,6 @@ const bottleCtrl = require('./bottle.ctrl');
const
bottle
=
new
Router
();
bottle
.
post
(
'/lookupInfo'
,
bottleCtrl
.
lookupInfo
);
bottle
.
post
(
'/setmedicine'
,
bottleCtrl
.
setMedicine
);
module
.
exports
=
bottle
;
\ No newline at end of file
...
...
Please
register
or
login
to post a comment