-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worked on email templete #8
base: master
Are you sure you want to change the base?
Conversation
utils/transporter.js
Outdated
const transporter = nodemailer.createTransport({ | ||
service: "gmail", | ||
auth: { | ||
user: "[email protected]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use any credentials used in config files or default.json. Can be used at multiple places and will have to update at one place only, if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
`, | ||
}; | ||
|
||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should try-catch the whole function, and return the error. Anything could fail not just the mail.
app.js
Outdated
@@ -4,11 +4,12 @@ const cors = require("cors"); | |||
const bcryptjs = require("bcryptjs"); | |||
require("dotenv").config(); | |||
require("./db/connectionDB"); | |||
require('./models/user') | |||
require('./models/Survey') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be /survey. Filename case should match always.
No description provided.