From 499d9015955c0cedd094fbe814dee6235e639627 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Oct 2018 14:35:35 +0200 Subject: Fix config endpoint --- server/helpers/core-utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/helpers/core-utils.ts') diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index b1a27e089..00bc0bdda 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts @@ -8,9 +8,9 @@ import * as createTorrent from 'create-torrent' import { createHash, pseudoRandomBytes } from 'crypto' import { isAbsolute, join } from 'path' import * as pem from 'pem' -import * as rimraf from 'rimraf' import { URL } from 'url' import { truncate } from 'lodash' +import { exec } from 'child_process' const timeTable = { ms: 1, @@ -178,6 +178,8 @@ const bcryptComparePromise = promisify2(bcrypt.compare) const bcryptGenSaltPromise = promisify1(bcrypt.genSalt) const bcryptHashPromise = promisify2(bcrypt.hash) const createTorrentPromise = promisify2(createTorrent) +const execPromise2 = promisify2(exec) +const execPromise = promisify1(exec) // --------------------------------------------------------------------------- @@ -203,5 +205,7 @@ export { bcryptComparePromise, bcryptGenSaltPromise, bcryptHashPromise, - createTorrentPromise + createTorrentPromise, + execPromise2, + execPromise } -- cgit v1.2.3