Plz bhai plz

This commit is contained in:
Blaster4385 2023-04-28 22:26:44 +05:30
parent 36b171c6dd
commit ffa8b1c2f5
4 changed files with 14 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import Index from './routes'
import './styles/GlobalVariables.css' import './styles/GlobalVariables.css'
const App = () => { const App = () => {
localStorage.setItem('i18nextLng', 'en')
return ( return (
<> <>
<LanguageSelect /> <LanguageSelect />

7
server/.env.sample Normal file
View file

@ -0,0 +1,7 @@
CONNECTION_URL =
PORT =
//TWILIO
TWILIO_ACCOUNT_SID =
TWILIO_AUTH_TOKEN =
TWILIO_PHONE_NUMBER =

View file

@ -95,13 +95,14 @@ const updateUser = async (req, res) => {
); );
if (!user.aadhaarNumber) { if (!user.aadhaarNumber) {
let aadhaarnum=generateAadhaar()
await UserDetails.findByIdAndUpdate(id, { await UserDetails.findByIdAndUpdate(id, {
$set: { aadhaarNumber: generateAadhaar() }, $set: { aadhaarNumber: aadhaarnum },
}); });
console.log(user)
sendSMS( sendSMS(
user.mobile, `+91${user.mobile}`,
`Dear ${user.name}, your Aadhaar Number is ${user.aadhaarNumber} for the EID ${user._id}.` `Dear ${user.name}, your Aadhaar Number is ${aadhaarnum} for the EID ${user._id}.`
); );
} }

View file

@ -5,6 +5,7 @@ const authToken = process.env.TWILIO_AUTH_TOKEN;
const sendSMS = (phone, message) => { const sendSMS = (phone, message) => {
const client = twilio(accountSid, authToken); const client = twilio(accountSid, authToken);
console.log(phone, message);
client.messages client.messages
.create({ .create({
body: message, body: message,