Plz bhai plz
This commit is contained in:
parent
36b171c6dd
commit
ffa8b1c2f5
4 changed files with 14 additions and 4 deletions
|
@ -4,6 +4,7 @@ import Index from './routes'
|
|||
import './styles/GlobalVariables.css'
|
||||
|
||||
const App = () => {
|
||||
localStorage.setItem('i18nextLng', 'en')
|
||||
return (
|
||||
<>
|
||||
<LanguageSelect />
|
||||
|
|
7
server/.env.sample
Normal file
7
server/.env.sample
Normal file
|
@ -0,0 +1,7 @@
|
|||
CONNECTION_URL =
|
||||
PORT =
|
||||
|
||||
//TWILIO
|
||||
TWILIO_ACCOUNT_SID =
|
||||
TWILIO_AUTH_TOKEN =
|
||||
TWILIO_PHONE_NUMBER =
|
|
@ -95,13 +95,14 @@ const updateUser = async (req, res) => {
|
|||
);
|
||||
|
||||
if (!user.aadhaarNumber) {
|
||||
let aadhaarnum=generateAadhaar()
|
||||
await UserDetails.findByIdAndUpdate(id, {
|
||||
$set: { aadhaarNumber: generateAadhaar() },
|
||||
$set: { aadhaarNumber: aadhaarnum },
|
||||
});
|
||||
|
||||
console.log(user)
|
||||
sendSMS(
|
||||
user.mobile,
|
||||
`Dear ${user.name}, your Aadhaar Number is ${user.aadhaarNumber} for the EID ${user._id}.`
|
||||
`+91${user.mobile}`,
|
||||
`Dear ${user.name}, your Aadhaar Number is ${aadhaarnum} for the EID ${user._id}.`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|||
|
||||
const sendSMS = (phone, message) => {
|
||||
const client = twilio(accountSid, authToken);
|
||||
console.log(phone, message);
|
||||
client.messages
|
||||
.create({
|
||||
body: message,
|
||||
|
|
Loading…
Reference in a new issue