File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,7 @@ async function processRecord(record: SQSRecord) {
5252 return ;
5353 }
5454
55- // Only accept "chat" and "game"
56- if ( verb !== "chat" && verb !== "game" ) {
55+ if ( ! [ "chat" , "game" , "test" ] . includes ( verb ) ) {
5756 console . warn ( "Unsupported verb:" , verb ) ;
5857 return ;
5958 }
@@ -75,10 +74,10 @@ async function processRecord(record: SQSRecord) {
7574
7675 const now = Math . floor ( Date . now ( ) / 1000 ) ;
7776
78- for ( const item of result . Items ?? [ ] ) {
79- console . log ( `Processing item : ${ JSON . stringify ( item ) } ` ) ;
80- const connectionId = item . sk . S ! ;
81- const ttl = item . ttl ?. N ? parseInt ( item . ttl . N ) : null ;
77+ for ( const conn of result . Items ?? [ ] ) {
78+ console . log ( `Processing connection : ${ JSON . stringify ( conn ) } ` ) ;
79+ const connectionId = conn . sk . S ! ;
80+ const ttl = conn . ttl ?. N ? parseInt ( conn . ttl . N ) : null ;
8281
8382 // Delete expired TTL entries
8483 if ( ttl && ttl < now ) {
Original file line number Diff line number Diff line change @@ -73,11 +73,6 @@ provider:
7373 stage : ${opt:stage, 'dev'}
7474 profile : ${self:custom.stageConfig.${self:provider.stage}.profile}
7575 region : us-east-1
76- apiGateway :
77- websocketApiName : myWebSocketApi
78- websocketApi :
79- subprotocols :
80- - auth # <-- fixed subprotocol name the browser requests
8176 logs :
8277 websocket : true
8378 environment :
You can’t perform that action at this time.
0 commit comments