Skip to content

Commit

Permalink
update linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik-rishi committed May 4, 2024
1 parent 2f60498 commit 1c40743
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions template/src/api/routes/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function sendHandler(operation, channelName, channelAddress, isSpecV3) {
next()
} else {
throw new Error(\`\${nValidated} of ${ operation.messages().length } message schemas matched when exactly 1 should match\`);
}` : `await validateMessage(message.payload,'${ channelAddress }','${ message.name() }','subscribe');`
}` : `await validateMessage(message.payload,'${ channelAddress }','${ message.name() }','subscribe');`;

return `
${operation.hasSummary() ? `
Expand Down Expand Up @@ -121,8 +121,8 @@ function routeCode(channel, isSpecV3) {
}

export default function routeRender({asyncapi}) {
let majorSpecVersion = parseInt(asyncapi.version().split('.')[0]);
let isSpecV3 = (majorSpecVersion === 3);
const majorSpecVersion = parseInt(asyncapi.version().split('.')[0], 10);
const isSpecV3 = (majorSpecVersion === 3);
return asyncapi.channels().all().map(channel => {
return routeCode(channel, isSpecV3);
});
Expand Down

0 comments on commit 1c40743

Please sign in to comment.