From 4a96b996194792fa0568dee2bc09b0e34bccefaf Mon Sep 17 00:00:00 2001 From: HardiReady Date: Mon, 11 Feb 2019 23:06:49 +0100 Subject: [PATCH] fix linting --- server/routes/players.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/routes/players.js b/server/routes/players.js index 5a21d2c..3ec0610 100644 --- a/server/routes/players.js +++ b/server/routes/players.js @@ -69,10 +69,10 @@ campaignPlayer.route('/ranking/:campaignId') resItem.respawn += player.respawn; resItem.flagTouch += player.flagTouch; if (player.travelDistance) { - resItem.travelDistance += Math.round(player.travelDistance / 1000); + resItem.travelDistance += Math.round(player.travelDistance / 1000); // meters -> km } if (player.driverDistance) { - resItem.driverDistance += Math.round(player.driverDistance / 1000); + resItem.driverDistance += Math.round(player.driverDistance / 1000); // meters -> km } } resItem.warCount = playerInstances.length; @@ -82,12 +82,12 @@ campaignPlayer.route('/ranking/:campaignId') const getSortedField = (fieldName) => { let num = 1; - const filteredSortResult = rankingItems.map(item => { + const filteredSortResult = rankingItems.map((item) => { return { name: item.name, fraction: item.fraction, - [fieldName]: item[fieldName] - } + [fieldName]: item[fieldName], + }; }) .sort((a, b) => b[fieldName] - a[fieldName]); const res = JSON.parse(JSON.stringify(filteredSortResult)); -- 2.25.1