diff --git a/server/src/services/api/scannerApi.js b/server/src/services/api/scannerApi.js index 3a890b0ff..38053d748 100644 --- a/server/src/services/api/scannerApi.js +++ b/server/src/services/api/scannerApi.js @@ -92,7 +92,8 @@ async function scannerApi( parseFloat(data.scanCoords[0][0].toFixed(5)), parseFloat(data.scanCoords[0][1].toFixed(5)), ] - : backendConfig.platform === 'dragonite' || backendConfig.platform === 'custom' + : backendConfig.platform === 'dragonite' || + backendConfig.platform === 'custom' ? data.scanCoords?.map((coord) => [ parseFloat(coord[0].toFixed(5)), parseFloat(coord[1].toFixed(5)), @@ -321,7 +322,10 @@ async function scannerApi( (scannerResponse.status === 200 || scannerResponse.status === 201) && category === 'getQueue' ) { - if (backendConfig.platform === 'dragonite' || backendConfig.platform === 'custom') { + if ( + backendConfig.platform === 'dragonite' || + backendConfig.platform === 'custom' + ) { const { queue } = await scannerResponse.json() log.info( HELPERS.scanner, @@ -351,7 +355,8 @@ async function scannerApi( const trimmed = coords .filter((_c, i) => i < 25) .map((c) => - backendConfig.platform === 'dragonite' || backendConfig.platform === 'custom' + backendConfig.platform === 'dragonite' || + backendConfig.platform === 'custom' ? `${c[0]}, ${c[1]}` : typeof c === 'object' ? `${'lat' in c && c.lat}, ${'lon' in c && c.lon}`