X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Futils.ts;h=ad3b7949e586d6baeba36569b9f40a0faf9c9c72;hb=38c2fde13e90973731d56b97e92edd89c4c62dbb;hp=11c11829285954db39224a0e53c7945d87119acd;hpb=d57d1d83c6a4d98a735b21f4e8e749a5c1e1a479;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts index 11c118292..ad3b7949e 100644 --- a/server/helpers/utils.ts +++ b/server/helpers/utils.ts @@ -1,11 +1,9 @@ import { ResultList } from '../../shared' -import { ApplicationModel } from '../models/application/application' import { execPromise, execPromise2, randomBytesPromise, sha256 } from './core-utils' import { logger } from './logger' import { join } from 'path' import { Instance as ParseTorrent } from 'parse-torrent' import { remove } from 'fs-extra' -import * as memoizee from 'memoizee' import { CONFIG } from '../initializers/config' import { isVideoFileExtnameValid } from './custom-validators/videos' @@ -33,16 +31,6 @@ function getFormattedObjects> (objects: } as ResultList } -const getServerActor = memoizee(async function () { - const application = await ApplicationModel.load() - if (!application) throw Error('Could not load Application from database.') - - const actor = application.Account.Actor - actor.Account = application.Account - - return actor -}, { promise: true }) - function generateVideoImportTmpPath (target: string | ParseTorrent, extensionArg?: string) { const id = typeof target === 'string' ? target @@ -105,7 +93,6 @@ export { generateRandomString, getFormattedObjects, getSecureTorrentName, - getServerActor, getServerCommit, generateVideoImportTmpPath, getUUIDFromFilename