Skip to content

Commit

Permalink
Issue: #CO-800 merge: Merge pull request #341 from shubhambansaltaren…
Browse files Browse the repository at this point in the history
…to/fb/CO-800

Issue: #CO-800: user object modified
  • Loading branch information
vinukumar-vs authored Feb 20, 2024
2 parents 48d1f1b + e74b1f8 commit 59d9212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/service/userService.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function deleteOsUser (userDetails, callback) {
}

function onIndividualUserDeletion (req, response, userDetails) {
const eventData = generateDeleteUserEvent (req, response, userDetails, {});
const eventData = generateDeleteUserEvent (req, response, userDetails, []);
try {
KafkaService.sendRecordWithTopic(eventData, envVariables.COKREAT_USER_DELETE_KAFKA_TOPIC, function (err, res) {
if (err) {
Expand All @@ -341,7 +341,7 @@ function onOrgUserDeletion(req, response, userDetails) {
searchOSUserWithOsId(adminUserOrgDetails.userId, (adminErr, adminRes) => {
if (adminRes && adminRes.status == 200 && adminRes.data.result.User.length > 0) {
var adminDetails = adminRes.data.result.User[0];
const eventData = generateDeleteUserEvent (req, response, userDetails, {role: 'admin', users: [adminDetails.userId]});
const eventData = generateDeleteUserEvent (req, response, userDetails, [{role: 'admin', users: [adminDetails.userId]}]);
KafkaService.sendRecordWithTopic(eventData, envVariables.COKREAT_USER_DELETE_KAFKA_TOPIC, function (err, res) {
if (err) {
handleUserDeleteError(req, response, error);
Expand Down

0 comments on commit 59d9212

Please sign in to comment.