diff options
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r-- | server/helpers/utils.ts | 13 |
1 files changed, 0 insertions, 13 deletions
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 @@ | |||
1 | import { ResultList } from '../../shared' | 1 | import { ResultList } from '../../shared' |
2 | import { ApplicationModel } from '../models/application/application' | ||
3 | import { execPromise, execPromise2, randomBytesPromise, sha256 } from './core-utils' | 2 | import { execPromise, execPromise2, randomBytesPromise, sha256 } from './core-utils' |
4 | import { logger } from './logger' | 3 | import { logger } from './logger' |
5 | import { join } from 'path' | 4 | import { join } from 'path' |
6 | import { Instance as ParseTorrent } from 'parse-torrent' | 5 | import { Instance as ParseTorrent } from 'parse-torrent' |
7 | import { remove } from 'fs-extra' | 6 | import { remove } from 'fs-extra' |
8 | import * as memoizee from 'memoizee' | ||
9 | import { CONFIG } from '../initializers/config' | 7 | import { CONFIG } from '../initializers/config' |
10 | import { isVideoFileExtnameValid } from './custom-validators/videos' | 8 | import { isVideoFileExtnameValid } from './custom-validators/videos' |
11 | 9 | ||
@@ -33,16 +31,6 @@ function getFormattedObjects<U, V, T extends FormattableToJSON<U, V>> (objects: | |||
33 | } as ResultList<V> | 31 | } as ResultList<V> |
34 | } | 32 | } |
35 | 33 | ||
36 | const getServerActor = memoizee(async function () { | ||
37 | const application = await ApplicationModel.load() | ||
38 | if (!application) throw Error('Could not load Application from database.') | ||
39 | |||
40 | const actor = application.Account.Actor | ||
41 | actor.Account = application.Account | ||
42 | |||
43 | return actor | ||
44 | }, { promise: true }) | ||
45 | |||
46 | function generateVideoImportTmpPath (target: string | ParseTorrent, extensionArg?: string) { | 34 | function generateVideoImportTmpPath (target: string | ParseTorrent, extensionArg?: string) { |
47 | const id = typeof target === 'string' | 35 | const id = typeof target === 'string' |
48 | ? target | 36 | ? target |
@@ -105,7 +93,6 @@ export { | |||
105 | generateRandomString, | 93 | generateRandomString, |
106 | getFormattedObjects, | 94 | getFormattedObjects, |
107 | getSecureTorrentName, | 95 | getSecureTorrentName, |
108 | getServerActor, | ||
109 | getServerCommit, | 96 | getServerCommit, |
110 | generateVideoImportTmpPath, | 97 | generateVideoImportTmpPath, |
111 | getUUIDFromFilename | 98 | getUUIDFromFilename |