-
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
Road Map and Email set-up #44
Conversation
b88ad6b
to
9770d9d
Compare
UpdateRoadmap component that could include the email form Road Map backend route, controller, service set up Backend Email service (using CHES) CHES connection environment variables
Add BCC config for prod. Emails are sending.
* @param {string} value The CSV string to parse | ||
* @returns {string[]} An array of string values, or `value` if it is not a string | ||
*/ | ||
export function parseCSV(value: string): Array<string> { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
router.use(requireSomeAuth); | ||
|
||
// Send an email with the roadmap data | ||
router.put('/', roadmapValidator.send, (req: Request, res: Response, next: NextFunction): void => { |
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.
Similar blocks of code found in 4 locations. Consider refactoring.
if (emailData.to && !Array.isArray(emailData.to)) { | ||
emailData.to = parseCSV(emailData.to); | ||
} | ||
if (emailData.cc && !Array.isArray(emailData.cc)) { |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
* @returns {Promise} An axios response | ||
*/ | ||
send(activityId: string, emailData: any) { | ||
if (emailData.to && !Array.isArray(emailData.to)) { |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
if (emailData.cc && !Array.isArray(emailData.cc)) { | ||
emailData.cc = parseCSV(emailData.cc); | ||
} | ||
if (emailData.bcc && !Array.isArray(emailData.bcc)) { |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
Code Climate has analyzed commit 336cbc9 and detected 7 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 9.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 34.8%. View more on Code Climate. |
Description
Types of changes
Checklist
Further comments