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:
2025-09-05 13:54:25 +05:30
parent 4857ef6cab
commit aaa11287a1
3 changed files with 29 additions and 23 deletions

View File

@@ -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