Skip to content

Commit

Permalink
Return from the connect-read handler
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasnaphas committed Apr 21, 2024
1 parent 9d7585f commit 20e4723
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend-v2/connect-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports.handler = async function (event, context, callback) {
[schema.SORT_KEY]: schema.READ_PAGE_SOCKET_CONNECTION,
ConnectionId: event.requestContext.connectionId,
GSI1PK: `${schema.SEDER_CODE}${schema.SEPARATOR}${sederCode}`,
GSI1SK: (new Date()).toISOString()
GSI1SK: new Date().toISOString(),
},
});
const putConnectionIdResponse = await ddbDocClient.send(
Expand All @@ -74,4 +74,8 @@ exports.handler = async function (event, context, callback) {
return { statusCode: 500, body: "failed to save read connection id" };
}
console.log(`saved read connection id ${event.requestContext.connectionId}`);
return {
statusCode: 200,
body: "Connected",
};
};

0 comments on commit 20e4723

Please sign in to comment.