From e74b1f8da13f3b1fb3d376c2cd342eccb17349ac Mon Sep 17 00:00:00 2001 From: Shubham Bansal Date: Tue, 20 Feb 2024 12:49:44 +0530 Subject: [PATCH] Issue: #CO-800: user object modified --- src/service/userService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/userService.js b/src/service/userService.js index acc639d1..09c276b1 100644 --- a/src/service/userService.js +++ b/src/service/userService.js @@ -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) { @@ -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);