aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-20 18:31:49 +0200
committerChocobozzz <me@florianbigard.com>2018-07-24 14:04:05 +0200
commit0b18f4aa80df8868bf34605423c7a298dffbb2aa (patch)
tree25299da5d94fc73e88b21e87aeb2c156999c6fcd /shared/models
parentd525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9 (diff)
downloadPeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.tar.gz
PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.tar.zst
PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.zip
Add advanced search in client
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/search/index.ts1
-rw-r--r--shared/models/search/nsfw-query.model.ts1
-rw-r--r--shared/models/search/videos-search-query.model.ts4
3 files changed, 5 insertions, 1 deletions
diff --git a/shared/models/search/index.ts b/shared/models/search/index.ts
index 288ee41ef..928846c39 100644
--- a/shared/models/search/index.ts
+++ b/shared/models/search/index.ts
@@ -1 +1,2 @@
1export * from './nsfw-query.model'
1export * from './videos-search-query.model' 2export * from './videos-search-query.model'
diff --git a/shared/models/search/nsfw-query.model.ts b/shared/models/search/nsfw-query.model.ts
new file mode 100644
index 000000000..6b6ad1991
--- /dev/null
+++ b/shared/models/search/nsfw-query.model.ts
@@ -0,0 +1 @@
export type NSFWQuery = 'true' | 'false' | 'both'
diff --git a/shared/models/search/videos-search-query.model.ts b/shared/models/search/videos-search-query.model.ts
index bb23bd636..dc14b1177 100644
--- a/shared/models/search/videos-search-query.model.ts
+++ b/shared/models/search/videos-search-query.model.ts
@@ -1,3 +1,5 @@
1import { NSFWQuery } from './nsfw-query.model'
2
1export interface VideosSearchQuery { 3export interface VideosSearchQuery {
2 search: string 4 search: string
3 5
@@ -8,7 +10,7 @@ export interface VideosSearchQuery {
8 startDate?: string // ISO 8601 10 startDate?: string // ISO 8601
9 endDate?: string // ISO 8601 11 endDate?: string // ISO 8601
10 12
11 nsfw?: boolean 13 nsfw?: NSFWQuery
12 14
13 categoryOneOf?: number[] 15 categoryOneOf?: number[]
14 16