Skip to content

Commit

Permalink
Update clearEventHandler.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishk123 authored Oct 28, 2024
1 parent efa81ba commit 3d7c680
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/pubsub/handlers/clearEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ export default class clearEventHandler extends BaseHandler {

async handle(message) {
const eventInvokerInfo = new EventInvocation();
let sdkType;
if (!message.params.event.includes('_')) {
sdkType = CONSTANTS.CORE.toLowerCase();
} else {
sdkType = message.params.event.split('_')[0].toLowerCase();
}
if (message.action != null && message.action != 'NA') {
sdkType = message.action;
process.env.SDK_TYPE = sdkType;
}
try {
const validationReport = eventInvokerInfo.clearEventListeners(message.params.event);
return JSON.stringify({ report: validationReport });
Expand Down

0 comments on commit 3d7c680

Please sign in to comment.