Skip to content

Commit

Permalink
Merge pull request #141 from lahirumenik/main
Browse files Browse the repository at this point in the history
backend complete
  • Loading branch information
lahirumenik authored Jan 28, 2024
2 parents 6eeff38 + 75ce000 commit 3ece981
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion backend/serverless/Lambda/gunsocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports.handler = async (event, context) => {
"gunid": {"S": gunid},

}

};


Expand All @@ -51,7 +52,7 @@ exports.handler = async (event, context) => {


const gyrosocketmsg =JSON.stringify({
"gyrox": gyrox,
// "gyrox": gyrox,
"gyroy": gyroy
})
const shootsocketmsg =JSON.stringify({
Expand Down
8 changes: 4 additions & 4 deletions backend/serverless/Lambda/healthammo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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',
Expand Down

0 comments on commit 3ece981

Please sign in to comment.