-
Notifications
You must be signed in to change notification settings - Fork 9
feat(PM-1792): update workflow run item #91
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
); | ||
} | ||
|
||
const updateData: any = {}; |
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.
Consider using a more specific type for updateData
instead of any
to improve type safety and maintainability.
workflowRunItemId: itemId, | ||
content: comment.content, | ||
parentId: comment.parentId, | ||
createdBy: '', |
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 createdBy
field is being set to an empty string. If this is intentional, consider adding a validation or default value to ensure consistency.
createdAt: new Date(), | ||
userId: user.userId as string, | ||
updatedAt: new Date(), | ||
updatedBy: '', |
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 updatedBy
field is being set to an empty string. If this is intentional, consider adding a validation or default value to ensure consistency.
|
||
const updateData: any = {}; | ||
|
||
if (patchData.upVotes !== undefined) { |
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.
We should extend the logic here to allow M2M to be able to update everything, except scorecardQuestionId
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.
@kkartunov Now this logic is updated, can you please do a review again?
What's in this PR?
Ticket link - https://topcoder.atlassian.net/browse/PM-1792