Style fixes to PR #995 based on feedback
This commit is contained in:
@@ -46,12 +46,11 @@ function send (state) {
|
|||||||
|
|
||||||
const opts = {
|
const opts = {
|
||||||
url: config.TELEMETRY_URL,
|
url: config.TELEMETRY_URL,
|
||||||
method: 'POST',
|
|
||||||
body: telemetry,
|
body: telemetry,
|
||||||
json: true
|
json: true
|
||||||
}
|
}
|
||||||
|
|
||||||
get(opts, function (err, res) {
|
get.post(opts, function (err, res) {
|
||||||
if (err) return console.error('Error sending telemetry', err)
|
if (err) return console.error('Error sending telemetry', err)
|
||||||
if (res.statusCode !== 200) {
|
if (res.statusCode !== 200) {
|
||||||
return console.error(`Error sending telemetry, status code: ${res.statusCode}`)
|
return console.error(`Error sending telemetry, status code: ${res.statusCode}`)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const Application = require('spectron').Application
|
const Application = require('spectron').Application
|
||||||
|
const cpFile = require('cp-file')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const mkdirp = require('mkdirp')
|
const mkdirp = require('mkdirp')
|
||||||
const parseTorrent = require('parse-torrent')
|
const parseTorrent = require('parse-torrent')
|
||||||
@@ -208,7 +209,6 @@ function extractImportantFields (parsedTorrent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function copy (pathFrom, pathTo) {
|
function copy (pathFrom, pathTo) {
|
||||||
const cpFile = require('cp-file')
|
|
||||||
try {
|
try {
|
||||||
cpFile.sync(pathFrom, pathTo)
|
cpFile.sync(pathFrom, pathTo)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user