Skip to content

Commit

Permalink
remove intermediary variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik-rishi committed Apr 30, 2024
1 parent 2d2b4f5 commit 0317007
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions template/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ export default function indexEntrypointFile({asyncapi, params}) {

const handlers = asyncapi.channels().all().map(channel => {
const channelName = channel.id();
const x = channel.operations().all().map(operation => {
return channel.operations().all().map(operation => {
const operationId = operation.id();
return `${convertOpertionIdToMiddlewareFn(operationId)} : require('./handlers/${convertToFilename(channelName)}').${convertOpertionIdToMiddlewareFn(operationId)}`
});
return x;
}).join(',');

return <File name={'index.js'}>
Expand Down

0 comments on commit 0317007

Please sign in to comment.