diff options
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r-- | server/helpers/utils.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts index 9b89e3e61..3c3406e38 100644 --- a/server/helpers/utils.ts +++ b/server/helpers/utils.ts | |||
@@ -7,6 +7,7 @@ import { join } from 'path' | |||
7 | import { Instance as ParseTorrent } from 'parse-torrent' | 7 | import { Instance as ParseTorrent } from 'parse-torrent' |
8 | import { remove } from 'fs-extra' | 8 | import { remove } from 'fs-extra' |
9 | import * as memoizee from 'memoizee' | 9 | import * as memoizee from 'memoizee' |
10 | import { isArray } from './custom-validators/misc' | ||
10 | 11 | ||
11 | function deleteFileAsync (path: string) { | 12 | function deleteFileAsync (path: string) { |
12 | remove(path) | 13 | remove(path) |
@@ -19,10 +20,7 @@ async function generateRandomString (size: number) { | |||
19 | return raw.toString('hex') | 20 | return raw.toString('hex') |
20 | } | 21 | } |
21 | 22 | ||
22 | interface FormattableToJSON { | 23 | interface FormattableToJSON { toFormattedJSON (args?: any) } |
23 | toFormattedJSON (args?: any) | ||
24 | } | ||
25 | |||
26 | function getFormattedObjects<U, T extends FormattableToJSON> (objects: T[], objectsTotal: number, formattedArg?: any) { | 24 | function getFormattedObjects<U, T extends FormattableToJSON> (objects: T[], objectsTotal: number, formattedArg?: any) { |
27 | const formattedObjects: U[] = [] | 25 | const formattedObjects: U[] = [] |
28 | 26 | ||