From 0b18f4aa80df8868bf34605423c7a298dffbb2aa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Jul 2018 18:31:49 +0200 Subject: Add advanced search in client --- shared/models/search/index.ts | 1 + shared/models/search/nsfw-query.model.ts | 1 + shared/models/search/videos-search-query.model.ts | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 shared/models/search/nsfw-query.model.ts (limited to 'shared') 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 @@ +export * from './nsfw-query.model' export * 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 @@ +import { NSFWQuery } from './nsfw-query.model' + export interface VideosSearchQuery { search: string @@ -8,7 +10,7 @@ export interface VideosSearchQuery { startDate?: string // ISO 8601 endDate?: string // ISO 8601 - nsfw?: boolean + nsfw?: NSFWQuery categoryOneOf?: number[] -- cgit v1.2.3