Showing
1 changed file
with
1 additions
and
1 deletions
@@ -25,7 +25,7 @@ const praiseArticle = (req, res, next) => { | @@ -25,7 +25,7 @@ const praiseArticle = (req, res, next) => { | ||
25 | /* 判断参数是否有效 */ | 25 | /* 判断参数是否有效 */ |
26 | let id = req.body.id, | 26 | let id = req.body.id, |
27 | opt = req.body.opt || 'ok', | 27 | opt = req.body.opt || 'ok', |
28 | - udid = req.sessionID; | 28 | + udid = req.sessionID || require('md5')(req.ip) || 'yoho'; |
29 | 29 | ||
30 | if (!stringProcess.isNumeric(id)) { | 30 | if (!stringProcess.isNumeric(id)) { |
31 | res.json({ code: 400, message: '非法请求', data: '' }); | 31 | res.json({ code: 400, message: '非法请求', data: '' }); |
-
Please register or login to post a comment