diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:36:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 15:36:03 +0200 |
commit | 690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 (patch) | |
tree | b16b8536acd2098aba8c1d6fe13a336dd6aa01a9 /server/initializers/checker-after-init.ts | |
parent | bbd5aa7ead5f1554a0872963f957effc26d8c630 (diff) | |
download | PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.gz PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.zst PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.zip |
Prefer using Object.values
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r-- | server/initializers/checker-after-init.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index 74c82541e..42839d1c9 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import config from 'config' | 1 | import config from 'config' |
2 | import { uniq } from 'lodash' | ||
3 | import { URL } from 'url' | 2 | import { URL } from 'url' |
4 | import { getFFmpegVersion } from '@server/helpers/ffmpeg' | 3 | import { getFFmpegVersion } from '@server/helpers/ffmpeg' |
4 | import { uniqify } from '@shared/core-utils' | ||
5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' | 5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' |
6 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' | 6 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' |
7 | import { isProdInstance, parseSemVersion } from '../helpers/core-utils' | 7 | import { isProdInstance, parseSemVersion } from '../helpers/core-utils' |
@@ -141,7 +141,7 @@ function checkLocalRedundancyConfig () { | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | const filtered = uniq(redundancyVideos.map(r => r.strategy)) | 144 | const filtered = uniqify(redundancyVideos.map(r => r.strategy)) |
145 | if (filtered.length !== redundancyVideos.length) { | 145 | if (filtered.length !== redundancyVideos.length) { |
146 | throw new Error('Redundancy video entries should have unique strategies') | 146 | throw new Error('Redundancy video entries should have unique strategies') |
147 | } | 147 | } |