feat : admin user rights updated.
feat : update for otp sent for registration. feat: login Api updated passes "rights" in response
This commit is contained in:
@@ -7,14 +7,15 @@ const templates = require('../util/sms_template');
|
||||
|
||||
// Send OTP
|
||||
async function SendOtp(req, res) {
|
||||
const { mobileNumber, type, amount, beneficiary, ifsc, acctFrom, acctTo, ref, date } = req.body;
|
||||
const { mobileNumber, type, amount, beneficiary, ifsc, acctFrom, acctTo, ref, date,userOtp } = req.body;
|
||||
|
||||
if (!mobileNumber || !type) {
|
||||
return res.status(400).json({ error: 'Mobile number and type are required' });
|
||||
}
|
||||
|
||||
try {
|
||||
const otp = generateOTP(6);
|
||||
// const otp = generateOTP(6);
|
||||
const otp = type === 'REGISTRATION' && userOtp ? userOtp : generateOTP(6);
|
||||
let message;
|
||||
|
||||
// Pick template based on type
|
||||
|
||||
Reference in New Issue
Block a user