diff options
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 469ea4d63..a45c0402a 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -10,7 +10,7 @@ import validator from 'validator' | |||
10 | import { getLowercaseExtension } from '@server/helpers/core-utils' | 10 | import { getLowercaseExtension } from '@server/helpers/core-utils' |
11 | import { buildUUID } from '@server/helpers/uuid' | 11 | import { buildUUID } from '@server/helpers/uuid' |
12 | import { HttpStatusCode } from '@shared/core-utils' | 12 | import { HttpStatusCode } from '@shared/core-utils' |
13 | import { VideosCommonQuery } from '@shared/models' | 13 | import { BooleanBothQuery, VideosCommonQuery } from '@shared/models' |
14 | import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' | 14 | import { loadLanguages, VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' |
15 | import { VideoDetails, VideoPrivacy } from '../../models/videos' | 15 | import { VideoDetails, VideoPrivacy } from '../../models/videos' |
16 | import { | 16 | import { |
@@ -159,7 +159,7 @@ function getVideosList (url: string) { | |||
159 | .expect('Content-Type', /json/) | 159 | .expect('Content-Type', /json/) |
160 | } | 160 | } |
161 | 161 | ||
162 | function getVideosListWithToken (url: string, token: string, query: { nsfw?: boolean } = {}) { | 162 | function getVideosListWithToken (url: string, token: string, query: { nsfw?: BooleanBothQuery } = {}) { |
163 | const path = '/api/v1/videos' | 163 | const path = '/api/v1/videos' |
164 | 164 | ||
165 | return request(url) | 165 | return request(url) |
@@ -219,7 +219,7 @@ function getAccountVideos ( | |||
219 | count: number, | 219 | count: number, |
220 | sort?: string, | 220 | sort?: string, |
221 | query: { | 221 | query: { |
222 | nsfw?: boolean | 222 | nsfw?: BooleanBothQuery |
223 | search?: string | 223 | search?: string |
224 | } = {} | 224 | } = {} |
225 | ) { | 225 | ) { |
@@ -245,7 +245,7 @@ function getVideoChannelVideos ( | |||
245 | start: number, | 245 | start: number, |
246 | count: number, | 246 | count: number, |
247 | sort?: string, | 247 | sort?: string, |
248 | query: { nsfw?: boolean } = {} | 248 | query: { nsfw?: BooleanBothQuery } = {} |
249 | ) { | 249 | ) { |
250 | const path = '/api/v1/video-channels/' + videoChannelName + '/videos' | 250 | const path = '/api/v1/video-channels/' + videoChannelName + '/videos' |
251 | 251 | ||