-
Notifications
You must be signed in to change notification settings - Fork 55
fix(PM-1168): Email template while inviting copilot #811
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
Conversation
@@ -992,7 +992,7 @@ module.exports = (app, logger) => { | |||
/* | |||
Send event for Notification Service | |||
*/ | |||
const projectId = _.parseInt(req.params.projectId); | |||
const projectId = resource.projectId; |
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.
The change from _.parseInt(req.params.projectId)
to resource.projectId
assumes that resource.projectId
is already an integer. Ensure that resource.projectId
is validated or converted to an integer if necessary to prevent potential type issues.
@@ -1,13 +1,11 @@ | |||
import _ from 'lodash'; | |||
import validate from 'express-validation'; | |||
import Joi from 'joi'; | |||
import config from 'config'; | |||
|
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.
The import statement for 'config' has been removed. Ensure that this removal is intentional and that 'config' is not needed elsewhere in the code.
|
||
import models from '../../models'; | ||
import util from '../../util'; | ||
import { PERMISSION } from '../../permissions/constants'; | ||
import { createEvent } from '../../services/busApi'; | ||
import { CONNECT_NOTIFICATION_EVENT, COPILOT_APPLICATION_STATUS, COPILOT_OPPORTUNITY_STATUS, COPILOT_REQUEST_STATUS, EVENT, INVITE_STATUS, PROJECT_MEMBER_ROLE, RESOURCES } from '../../constants'; | ||
import { COPILOT_APPLICATION_STATUS, COPILOT_OPPORTUNITY_STATUS, COPILOT_REQUEST_STATUS, EVENT, INVITE_STATUS, PROJECT_MEMBER_ROLE, RESOURCES } from '../../constants'; | ||
|
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.
The import for 'CONNECT_NOTIFICATION_EVENT' and 'createEvent' has been removed. Verify that these are not used in the code and that their removal does not affect functionality.
@@ -98,16 +89,12 @@ module.exports = [ | |||
throw err; | |||
} | |||
|
|||
const applicationUser = await util.getMemberDetailsByUserIds([userId], req.log, req.id); | |||
req.log.info(applicationUser, 'applicationUser asdsd', userId); | |||
|
|||
const invite = await models.ProjectMemberInvite.create({ |
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.
The invite
object creation is missing the email
field, which was removed. Ensure that the email is being set correctly elsewhere if needed for the invitation process.
What's in this PR?
Ticket link - https://topcoder.atlassian.net/browse/PM-1168