diff options
author | Blaster4385 <[email protected]> | 2022-08-19 23:51:13 +0530 |
---|---|---|
committer | Blaster4385 <[email protected]> | 2022-08-19 23:51:13 +0530 |
commit | 856728cfae03da554d4db91b0635a53f1c9f915c (patch) | |
tree | 1ce1fa3561dc6935f4f3aab521773145cdd3f7ec /server/controllers/otp.js | |
parent | 6c867e639e565262bbf71342f953456a7d0b7f7a (diff) |
DeShit the api
Diffstat (limited to 'server/controllers/otp.js')
-rw-r--r-- | server/controllers/otp.js | 17 |
1 files changed, 0 insertions, 17 deletions
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}; |