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:39:07 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3d41d6d04f89b0576234fd52d3577d6c7e6d47d6
3d41d6d0
1 parent
39154021
style. unecessary code remove and marking
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
13 deletions
server/src/api/auth/index.js
server/src/api/bottle/bottle.ctrl.js
server/src/api/bottle/index.js
server/src/api/hub/index.js
server/src/api/medicine/index.js
server/src/api/auth/index.js
View file @
3d41d6d
...
...
@@ -3,8 +3,28 @@ const authCtrl = require('./auth.ctrl');
const
auth
=
new
Router
();
/**
* 회원가입 (email type)
* url : http://localhost:4000/api/auth/register
* request parameter : userId, password, passwordCheck
* return : null
*/
auth
.
post
(
'/register'
,
authCtrl
.
register
);
/**
* 로그인 (email type)
* url : http://localhost:4000/api/auth/login
* request parameter : userId, password
* return : userId
*/
auth
.
post
(
'/login'
,
authCtrl
.
login
);
/**
* 로그아웃
* url : http://localhost:4000/api/auth/logout
* request parameter : null
* return : null
*/
auth
.
post
(
'/logout'
,
authCtrl
.
logout
);
module
.
exports
=
auth
;
\ No newline at end of file
...
...
server/src/api/bottle/bottle.ctrl.js
View file @
3d41d6d
...
...
@@ -162,16 +162,3 @@ exports.setMedicine = async(ctx) => {
ctx
.
status
=
200
;
}
const
dataRequest
=
()
=>
{
return
'dataRequest'
}
const
getData
=
async
()
=>
{
return
'getData'
}
const
dataProcess
=
async
()
=>
{
return
'dataProcess..'
}
...
...
server/src/api/bottle/index.js
View file @
3d41d6d
...
...
@@ -3,9 +3,36 @@ const bottleCtrl = require('./bottle.ctrl');
const
bottle
=
new
Router
();
/**
* 약병 연결
* request parameter : bottleId, hubId
* url : http://localhost:4000/api/bottle
* return : null
*/
bottle
.
post
(
'/'
,
bottleCtrl
.
bottleConnect
);
/**
* 약병 연결 해제
* request parameter : x
* url : http://localhost:4000/api/bottle/:bottleId
* return : null
*/
bottle
.
delete
(
'/:bottleId'
,
bottleCtrl
.
bottleDisconnect
);
/**
* 약병 정보 확인
* request parameter : x
* url : http://localhost:4000/api/bottle/:bottleId
* return : bottle(json type)
*/
bottle
.
get
(
'/:bottleId'
,
bottleCtrl
.
lookupInfo
);
/**
* 약병에 약 등록 = 약 검색 후 약 ID(medicineId)와 복용 정보 보고 사용자가 약 복용량(dosage) 입력
* request parameter : medicineId, dosage
* url : http://localhost:4000/api/bottle/:bottleId
* return : bottle(json type)
*/
bottle
.
patch
(
'/:bottleId'
,
bottleCtrl
.
setMedicine
);
module
.
exports
=
bottle
;
\ No newline at end of file
...
...
server/src/api/hub/index.js
View file @
3d41d6d
...
...
@@ -3,7 +3,20 @@ const hubCtrl = require('./hub.ctrl');
const
hub
=
new
Router
();
/**
* 허브 등록
* request parameter : hubId, host, port
* url : http://localhost:4000/api/hub
* return : hub(json type)
*/
hub
.
post
(
'/'
,
hubCtrl
.
hubConnect
);
/**
* 허브 등록 해제
* request parameter : x
* url : http://localhost:4000/api/hub/:hubId
* return : null
*/
hub
.
delete
(
'/:hubId'
,
hubCtrl
.
hubDisconnect
);
module
.
exports
=
hub
;
\ No newline at end of file
...
...
server/src/api/medicine/index.js
View file @
3d41d6d
...
...
@@ -3,7 +3,20 @@ const medicineCtrl = require('./medicine.ctrl');
const
medicine
=
new
Router
();
/**
* 약 검색 후 검색 대상 가져오기
* request parameter : name, company, target 중 하나
* url : http://localhost:4000/api/medicine
* return : medicine List(json 타입의 List)
*/
medicine
.
post
(
'/'
,
medicineCtrl
.
medicineSearch
);
/**
* 약 검색 후 검색 대상 가져오기
* request parameter : x
* url : http://localhost:4000/api/medicine/:mdedicineId
* return : medicine(json type)
*/
medicine
.
get
(
'/:medicineId'
,
medicineCtrl
.
medicineGet
);
module
.
exports
=
medicine
;
\ No newline at end of file
...
...
Please
register
or
login
to post a comment