fix: 增加修改手机的验证码发送
This commit is contained in:
@@ -7,7 +7,8 @@ const CODE_TYPE = {
|
||||
msgSignIn: -1,
|
||||
signUp: 1,
|
||||
forgetPasswd: 2,
|
||||
changePasswd: 3
|
||||
changePasswd: 3,
|
||||
changePhone: 4
|
||||
};
|
||||
/**
|
||||
* code type:
|
||||
|
||||
@@ -14,6 +14,9 @@ const TicketSchema = new mongoose.Schema({
|
||||
amount: {
|
||||
type: Number
|
||||
},
|
||||
targetAddress: {
|
||||
type: String
|
||||
},
|
||||
status: {
|
||||
type: String
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = {
|
||||
code: 1,
|
||||
error: 'Missing required param'
|
||||
});
|
||||
const isValidCode = MsgCode.verifyCode({ id: userId, code, type: 2 });
|
||||
const isValidCode = MsgCode.verifyCode({ id: userId, code, type: 4 });
|
||||
if (!isValidCode) return res.json({
|
||||
code: 2,
|
||||
error: 'Incorrect Code'
|
||||
|
||||
Reference in New Issue
Block a user