Skip to content

Commit

Permalink
Add getClientId to get socketId for a user.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakshuGautam authored May 11, 2023
1 parent 9e172ea commit 5373ed3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,16 @@ export class AppController {
this.logger.error('Error while emitting bot response', error);
}
}

@Post('/getClientId')
async adapterOutbound(@Request() req) {
try {
const { userId } = req.body;
const clientId: string = await this.cacheManager.get(userId);
return { status: 'OK', clientId };
} catch (error) {
this.logger.error('Could not get the clientId for this userId', error);
}
}

}

0 comments on commit 5373ed3

Please sign in to comment.