diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-06 15:22:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | af971e06c620bd46a5aa64c8833364e7022b5e3d (patch) | |
tree | 4288b66b79fe4dd1ab9496e85a3abf7d747ad03a /shared/extra-utils/videos/videos.ts | |
parent | 23a3a8827cb8b862f5cc7ee2819f39918303beca (diff) | |
download | PeerTube-af971e06c620bd46a5aa64c8833364e7022b5e3d.tar.gz PeerTube-af971e06c620bd46a5aa64c8833364e7022b5e3d.tar.zst PeerTube-af971e06c620bd46a5aa64c8833364e7022b5e3d.zip |
Introduce search command
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 | ||