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