aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/search
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-27 14:37:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-10-29 11:48:21 +0200
commit2760b454a761f6af3138b2fb5f34340772ab0d1e (patch)
tree2b3a2d81478f8b432eb54cce4caa5a760c494627 /shared/models/search
parente4611b54910d8e7f2b4f8a97ee2d9cc8e1054127 (diff)
downloadPeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.tar.gz
PeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.tar.zst
PeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.zip
Deprecate filter video query
Introduce include and isLocal instead
Diffstat (limited to 'shared/models/search')
-rw-r--r--shared/models/search/videos-common-query.model.ts17
-rw-r--r--shared/models/search/videos-search-query.model.ts3
2 files changed, 14 insertions, 6 deletions
diff --git a/shared/models/search/videos-common-query.model.ts b/shared/models/search/videos-common-query.model.ts
index 2f2e9a934..55a98e302 100644
--- a/shared/models/search/videos-common-query.model.ts
+++ b/shared/models/search/videos-common-query.model.ts
@@ -1,4 +1,4 @@
1import { VideoFilter } from '../videos' 1import { VideoInclude } from '../videos/video-include.enum'
2import { BooleanBothQuery } from './boolean-both-query.model' 2import { BooleanBothQuery } from './boolean-both-query.model'
3 3
4// These query parameters can be used with any endpoint that list videos 4// These query parameters can be used with any endpoint that list videos
@@ -11,6 +11,12 @@ export interface VideosCommonQuery {
11 11
12 isLive?: boolean 12 isLive?: boolean
13 13
14 // FIXME: deprecated in 4.0 in favour of isLocal and include, to remove
15 filter?: never
16
17 isLocal?: boolean
18 include?: VideoInclude
19
14 categoryOneOf?: number[] 20 categoryOneOf?: number[]
15 21
16 licenceOneOf?: number[] 22 licenceOneOf?: number[]
@@ -20,17 +26,16 @@ export interface VideosCommonQuery {
20 tagsOneOf?: string[] 26 tagsOneOf?: string[]
21 tagsAllOf?: string[] 27 tagsAllOf?: string[]
22 28
23 filter?: VideoFilter
24
25 skipCount?: boolean 29 skipCount?: boolean
30
31 search?: string
26} 32}
27 33
28export interface VideosCommonQueryAfterSanitize extends VideosCommonQuery { 34export interface VideosCommonQueryAfterSanitize extends VideosCommonQuery {
29 start: number 35 start: number
30 count: number 36 count: number
31 sort: string 37 sort: string
32}
33 38
34export interface VideosWithSearchCommonQuery extends VideosCommonQuery { 39 // FIXME: deprecated in 4.0, to remove
35 search?: string 40 filter?: never
36} 41}
diff --git a/shared/models/search/videos-search-query.model.ts b/shared/models/search/videos-search-query.model.ts
index a5436879d..447c72806 100644
--- a/shared/models/search/videos-search-query.model.ts
+++ b/shared/models/search/videos-search-query.model.ts
@@ -23,4 +23,7 @@ export interface VideosSearchQueryAfterSanitize extends VideosSearchQuery {
23 start: number 23 start: number
24 count: number 24 count: number
25 sort: string 25 sort: string
26
27 // FIXME: deprecated in 4.0, to remove
28 filter?: never
26} 29}