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-09-21 03:15:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cafa0cb12d7ba51a73581431aa029748aa9e56b8
cafa0cb1
1 parent
9a028502
style. 주석, 불필요한 코드 삭제
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
14 deletions
server/src/lib/jwtMiddleWare.js
server/src/util/Batch.js
server/src/util/DataProcess.js
server/src/lib/jwtMiddleWare.js
View file @
cafa0cb
...
...
@@ -8,6 +8,7 @@ const jwtMiddleware = async (ctx, next) => {
}
try
{
// eslint-disable-next-line no-undef
const
decoded
=
jwt
.
verify
(
token
,
process
.
env
.
JWT_SECRET
);
ctx
.
state
.
user
=
{
_id
:
decoded
.
_id
,
...
...
server/src/util/Batch.js
View file @
cafa0cb
...
...
@@ -20,20 +20,6 @@ const updateMedicineInfo = require('../lib/UpdatingMedicineInfo');
const
{
sendPushMessage
}
=
require
(
'./FCM'
);
// //매년 1월 1일 00시 00분에 1살씩 추가
// exports.CheckNewYear = () => {
// cron.schedule('0 0 0 1 1 *', async () => {
// const profileList = await Profile.find();
// profileList.forEach(async profile => {
// await profile.updateUserAge();
// profile.save();
// });
// }, {
// timezone : 'Asia/Tokyo',
// });
// };
//매월 1일 0시 0분에 약 정보 업데이트
exports
.
updateMedicineData
=
async
()
=>
{
cron
.
schedule
(
'0 0 0 1 * *'
,
()
=>
{
...
...
server/src/util/DataProcess.js
View file @
cafa0cb
const
BottleMedicine
=
require
(
'../models/bottleMedicine'
);
const
TakeMedicineHist
=
require
(
'../models/takeMedicineHistory'
);
//message subscribe 후 message를 가공한 이후 해당 데이터를 보낼 topic과 message를 리턴하는 함수
exports
.
dataPublish
=
async
(
topic
,
message
)
=>
{
//client가 subscribe를 하면 메시지를 보낸 약병의 topic과 message를 가공 및 보낸 약병의 bottleId를 가져옴
...
...
Please
register
or
login
to post a comment