박권수

style. unecessary code remove and marking

......@@ -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
......
......@@ -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..'
}
......
......@@ -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
......
......@@ -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
......
......@@ -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
......