Skip to content

Commit

Permalink
Merge pull request aws-samples#2273 from gbiagini97/patch-1
Browse files Browse the repository at this point in the history
appsync-bedrock-subscriptions-cdk: Missing file due to .gitignore
  • Loading branch information
jbesw authored May 3, 2024
2 parents 6a947af + cf338d2 commit a819180
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion appsync-bedrock-subscriptions-cdk/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.js
!jest.config.js
*.d.ts
node_modules
Expand Down
17 changes: 17 additions & 0 deletions appsync-bedrock-subscriptions-cdk/src/send.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export function request(ctx) {
return {
payload: {
chatId: ctx.args.chatId,
data: ctx.args.data,
userId: ctx.args.userId
}
};
}

export function response(ctx) {
const { error, result } = ctx;
if (error) {
util.appendError(error.message, error.type, result);
}
return ctx.result
}

0 comments on commit a819180

Please sign in to comment.