Skip to content

Commit

Permalink
Merge pull request #84 from manipalutsav/feature-twilio
Browse files Browse the repository at this point in the history
Feature twilio
  • Loading branch information
manipalutsav-svc authored Feb 27, 2024
2 parents 278b559 + 4987cc5 commit f86981b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"start": "node ."
},
"dependencies": {
"bcrypt": "^4.0.1",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"chalk": "^3.0.0",
Expand Down
6 changes: 4 additions & 2 deletions src/controllers/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ const User = require("../models/User");
const twilio = require('twilio');
const Notification = require("../models/Notification");

const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
const client = null;
if(process.env.TWILIO_ACCOUNT_SID)
client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);

const sendToMe = async (req, res) => {
try {
Expand Down Expand Up @@ -153,4 +155,4 @@ module.exports = {
sendToMe,
sendToAllCoOrdinators,
getLog
}
}

0 comments on commit f86981b

Please sign in to comment.