Skip to content

Commit ec6e504

Browse files
committed
More logging
1 parent 491b8f2 commit ec6e504

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/sockets/authHandler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const handler = async (event: WebSocketEvent) => {
6060
console.log(`About to store the following record: ${JSON.stringify({ connectionId, userId})}`);
6161
console.log(`Table name: ${process.env.ABSTRACT_PLAY_TABLE}`);
6262

63-
await ddbDocClient.send(
63+
const result = await ddbDocClient.send(
6464
new PutCommand({
6565
TableName: process.env.ABSTRACT_PLAY_TABLE!,
6666
Item: {
@@ -75,10 +75,11 @@ export const handler = async (event: WebSocketEvent) => {
7575
},
7676
})
7777
);
78+
console.log(`Result: ${JSON.stringify(result)}`);
7879
console.log("Record written");
7980
// Now send a message back to the client
8081
const apiGwClient = new ApiGatewayManagementApiClient({
81-
region: "us-east-1",
82+
region: REGION,
8283
endpoint: `https://${domainName}/${stage}`,
8384
});
8485

0 commit comments

Comments
 (0)