realname
This commit is contained in:
@@ -194,22 +194,22 @@ module.exports = {
|
||||
encoding: 'utf-8'
|
||||
});
|
||||
const { pic1, pic2 } = form.data;
|
||||
const { name, nation, idType, idNo } = form.fields || {};
|
||||
if (!pic1 || !pic2 || !name || !nation || !idType || !idNo) return res.json({
|
||||
const { realname, nation, idType, idNo } = form.fields || {};
|
||||
if (!pic1 || !pic2 || !realname || !nation || !idType || !idNo) return res.json({
|
||||
code: 1,
|
||||
msg: '缺少必要信息'
|
||||
});
|
||||
const action = createAction(5, {
|
||||
userId,
|
||||
detail: { verifyLevel, name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }
|
||||
detail: { verifyLevel, realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }
|
||||
});
|
||||
const verifyReq = createVerifyReq({ userId, verifyLevel, name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path });
|
||||
const verifyReq = createVerifyReq({ userId, verifyLevel, realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path });
|
||||
await Promise.all([
|
||||
action.save(),
|
||||
verifyReq.save(),
|
||||
User.findByIdAndUpdate(userId, {
|
||||
verifyData: {
|
||||
[verifyLevel]: { name, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }
|
||||
[verifyLevel]: { realname, nation, idType, idNo, pic1: pic1.path, pic2: pic2.path }
|
||||
}
|
||||
})
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user