From 856728cfae03da554d4db91b0635a53f1c9f915c Mon Sep 17 00:00:00 2001 From: Blaster4385 Date: Fri, 19 Aug 2022 23:51:13 +0530 Subject: DeShit the api --- server/controllers/otp.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 server/controllers/otp.js (limited to 'server/controllers/otp.js') diff --git a/server/controllers/otp.js b/server/controllers/otp.js deleted file mode 100644 index 5b4bd82..0000000 --- a/server/controllers/otp.js +++ /dev/null @@ -1,17 +0,0 @@ -import generateOTP from '../utils/otp'; -import sendMessage from '../services/twilio'; - -const sendOTP = async (req, res) => { - const {mobile} = req.body; - - try { - const otp = generateOTP(); - const message = `Your OTP for Aadhaar verification is : ${otp}`; - sendMessage(mobile, message); - res.status(200).json({message: 'OTP sent successfully', otpCode: otp}); - } catch (error) { - res.status(404).json({message: error}); - } -}; - -export default {sendOTP}; -- cgit