Authored by htoooth

add comment

... ... @@ -8,6 +8,7 @@ const captchaService = require('../models/captcha-service');
const helpers = global.yoho.helpers;
const CAPTCHA = 'yoho4946abcdef#$%&!@';
// 对比函数
const _mustEqual = (req) => {
return req.body.verifyCode === req.session.captcha ||
req.body.verifyCode === CAPTCHA;
... ... @@ -78,6 +79,7 @@ const generate = (req, res, next) => {
}).catch(next);
};
// 端到端检查
const checkAPI = (req, res) => {
let count = req.session.captchaCount;
... ...