fix: 修改邀请人变量名
This commit is contained in:
@@ -68,12 +68,12 @@ module.exports = {
|
||||
signUpReqInviter: inject(function(SysConfig) {
|
||||
const { JWT_SECRET, PWD_HASH_SALT } = SysConfig;
|
||||
return async (req, res) => {
|
||||
let { phone, code, inviteCode, password } = req.body;
|
||||
if (!phone || !code || !password || !inviteCode) return res.json({
|
||||
let { phone, code, inviter, password } = req.body;
|
||||
if (!phone || !code || !password || !inviter) return res.json({
|
||||
code: 1,
|
||||
msg: 'Missing required parameters'
|
||||
});
|
||||
const invitePhone = '+86-' + parseInt(inviteCode);
|
||||
const invitePhone = '+86-' + parseInt(inviter);
|
||||
const validInviter = await User.findOne({ phone: invitePhone }).catch(null);
|
||||
if (!validInviter) return res.json({
|
||||
code: 4,
|
||||
|
||||
Reference in New Issue
Block a user