Skip to content

Commit

Permalink
fix: reply from functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Jan 11, 2024
1 parent 0ee38d0 commit 0e74944
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions examples/anime-http/server/asyncapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ operations:
$ref: '#/channels/trendingAnime'
messages:
- $ref: '#/components/messages/trendingAnime'
trindingAnimeReply:
action: send
channel:
$ref: '#/channels/trendingAnime'
messages:
- $ref: '#/components/messages/tendingAnime'
components:
messages:
trendingAnime:
Expand Down
10 changes: 6 additions & 4 deletions examples/anime-http/server/functions/trendingAnimeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ export default async function (event) {
const replyPayload = event.payload
const replyQuery = event.query
return {
reply: [
send: [
{
payload: replyPayload,
query: replyQuery
},
],
query: replyQuery,
channel: 'trendingAnime'
}

]
}
}

0 comments on commit 0e74944

Please sign in to comment.