命名冲突

This commit is contained in:
chaosBreaking
2019-10-15 10:53:30 +08:00
parent 6a2de800eb
commit 0be5babf28

View File

@@ -188,9 +188,9 @@ module.exports = {
const verifyLevel = 1;
// 防止多次提交
const req = await VReq.findOne({ userId, verifyLevel }).exec();
const userReq = await VReq.findOne({ userId, verifyLevel }).exec();
// 除非认证失败,status===2否则不能重复提交
if (req && +req.status !== 2) return res.json({ code: 1, msg: '请勿重复提交' });
if (userReq && +userReq.status !== 2) return res.json({ code: 1, msg: '请勿重复提交' });
const form = await parseForm(req, {
tag: userId,
uploadDir: userFileDir,