From 53abc4c272be9ecc951274458d054dbaf86e594d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 Oct 2017 16:31:24 +0100 Subject: Upgrade server packages --- server/helpers/core-utils.ts | 4 ++-- server/helpers/database-utils.ts | 2 +- server/helpers/peertube-crypto.ts | 6 +++--- server/helpers/requests.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index 33bbdca8b..3dae78144 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts @@ -103,11 +103,11 @@ const writeFilePromise = promisify2WithVoid(writeFile) const readdirPromise = promisify1(readdir) const mkdirpPromise = promisify1(mkdirp) const pseudoRandomBytesPromise = promisify1(pseudoRandomBytes) -const accessPromise = promisify1WithVoid(access) +const accessPromise = promisify1WithVoid(access) const opensslExecPromise = promisify2WithVoid(openssl.exec) const bcryptComparePromise = promisify2(bcrypt.compare) const bcryptGenSaltPromise = promisify1(bcrypt.genSalt) -const bcryptHashPromise = promisify2(bcrypt.hash) +const bcryptHashPromise = promisify2(bcrypt.hash) const createTorrentPromise = promisify2(createTorrent) const rimrafPromise = promisify1WithVoid(rimraf) const statPromise = promisify1(stat) diff --git a/server/helpers/database-utils.ts b/server/helpers/database-utils.ts index dcc9e2577..d62462d35 100644 --- a/server/helpers/database-utils.ts +++ b/server/helpers/database-utils.ts @@ -4,7 +4,7 @@ import * as retry from 'async/retry' import { logger } from './logger' type RetryTransactionWrapperOptions = { errorMessage: string, arguments?: any[] } -function retryTransactionWrapper (functionToRetry: (... args) => Promise, options: RetryTransactionWrapperOptions) { +function retryTransactionWrapper (functionToRetry: (...args) => Promise, options: RetryTransactionWrapperOptions) { const args = options.arguments ? options.arguments : [] return transactionRetryer(callback => { diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index fbc3bdcc2..10a226af4 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts @@ -40,7 +40,7 @@ function checkSignature (publicKey: string, data: string, hexSignature: string) return isValid } -async function sign (data: string|Object) { +async function sign (data: string | Object) { const sign = crypto.createSign(SIGNATURE_ALGORITHM) let dataString: string @@ -71,13 +71,13 @@ async function createCertsIfNotExist () { return } - return await createCerts() + return createCerts() } async function cryptPassword (password: string) { const salt = await bcryptGenSaltPromise(BCRYPT_SALT_SIZE) - return await bcryptHashPromise(password, salt) + return bcryptHashPromise(password, salt) } function getMyPrivateCert () { diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts index 8c5d848f3..af1f401de 100644 --- a/server/helpers/requests.ts +++ b/server/helpers/requests.ts @@ -13,7 +13,7 @@ import { sign } from './peertube-crypto' type MakeRetryRequestParams = { url: string, - method: 'GET'|'POST', + method: 'GET' | 'POST', json: Object } function makeRetryRequest (params: MakeRetryRequestParams) { @@ -31,7 +31,7 @@ function makeRetryRequest (params: MakeRetryRequestParams) { } type MakeSecureRequestParams = { - method: 'GET'|'POST' + method: 'GET' | 'POST' toPod: PodInstance path: string data?: Object -- cgit v1.2.3