in backend/Functions/HTTP/game_activate/app.js [44:58]
async function removeLiveForPlayer(playerName) {
try {
const parms = {TableName: playerInventoryTableName, IndexName: 'gsi-GameType',
KeyConditionExpression:'gameType=:gameType',
ExpressionAttributeValues:{':gameType':'LIVE='+playerName}
};
const otherLiveGames = await ddb.query(parms).promise();
for(var i=0;i<otherLiveGames.Count;i++) {
await removeLiveGame(otherLiveGames.Items[i].pk, otherLiveGames.Items[i].sk);
}
} catch(e) {
console.error(`error querying for live games ${e}`);
return false;
}
}