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-24 14:20:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9bb7d3b9515f424203f036e493ce65bc7c66035
f9bb7d3b
1 parent
5cc3d5dc
fix. dosage -> parseInt dosage
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
server/src/api/bottle/bottle.ctrl.js
server/src/api/bottle/bottle.ctrl.js
View file @
f9bb7d3
...
...
@@ -4,7 +4,6 @@ const Hub = require('../../models/hub');
const
Medicine
=
require
(
'../../models/medicine'
);
const
Mqtt
=
require
(
'../../lib/MqttModule'
);
const
jwt
=
require
(
'jsonwebtoken'
);
const
{
createIndexes
}
=
require
(
'../../models/bottle'
);
//약병 등록
exports
.
bottleConnect
=
async
(
ctx
)
=>
{
...
...
@@ -106,7 +105,7 @@ exports.lookupInfo = async(ctx) => {
return
;
}
const
hub
=
await
Hub
.
findByHubId
(
bottle
.
getHubId
());
const
hub
=
await
Hub
.
findByHubId
(
isBottleExist
.
getHubId
());
if
(
hub
.
getHub_UserId
()
!==
userId
)
{
ctx
.
status
=
403
;
return
;
...
...
@@ -159,7 +158,7 @@ exports.setMedicine = async(ctx) => {
bottleId
},
{
medicineId
,
dosage
dosage
:
parseInt
(
dosage
)
});
ctx
.
status
=
200
;
...
...
Please
register
or
login
to post a comment