diff --git a/backend/serverless/Lambda/gunsocket.js b/backend/serverless/Lambda/gunsocket.js index cc0c595..977e7bb 100644 --- a/backend/serverless/Lambda/gunsocket.js +++ b/backend/serverless/Lambda/gunsocket.js @@ -25,6 +25,7 @@ exports.handler = async (event, context) => { "gunid": {"S": gunid}, } + }; @@ -51,7 +52,7 @@ exports.handler = async (event, context) => { const gyrosocketmsg =JSON.stringify({ - "gyrox": gyrox, + // "gyrox": gyrox, "gyroy": gyroy }) const shootsocketmsg =JSON.stringify({ diff --git a/backend/serverless/Lambda/healthammo.js b/backend/serverless/Lambda/healthammo.js index d15e9a7..09ed930 100644 --- a/backend/serverless/Lambda/healthammo.js +++ b/backend/serverless/Lambda/healthammo.js @@ -11,9 +11,9 @@ const client = new ApiGatewayManagementApiClient({ endpoint: ENDPOINT }); exports.handler = async (event, context) => { try { const result = event; - const ammo = result.ammo; - const health = result.health; - const gunid = fireresult.ssid; + const ammo = result.Ammo; + const health = result.Health; + const gunid = result.SSID; var numericPart = gunid[3]; var topic = "gun/"+numericPart+"/healthammo"; @@ -33,7 +33,7 @@ exports.handler = async (event, context) => { const command = new PublishCommand(input); - const response = await client.send(command) + const response = await iotclient.send(command) const playerParams = { "TableName": 'arcombat-gunid',