aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/search/advanced-search.model.ts
diff options
context:
space:
mode:
authorAndrés Maldonado <amaldona@etu.utc.fr>2018-11-27 18:57:02 +0100
committerChocobozzz <me@florianbigard.com>2019-02-12 11:14:37 +0100
commit31d065cc50e17a9abf263ed8c606cb272cd4933d (patch)
tree5e4516cb48dd36490e817bd9e59c41f3cad0d968 /client/src/app/search/advanced-search.model.ts
parent7f8f8bdb4a1fb695a114874c4679605ac8911e2d (diff)
downloadPeerTube-31d065cc50e17a9abf263ed8c606cb272cd4933d.tar.gz
PeerTube-31d065cc50e17a9abf263ed8c606cb272cd4933d.tar.zst
PeerTube-31d065cc50e17a9abf263ed8c606cb272cd4933d.zip
Add search by original publication date
Diffstat (limited to 'client/src/app/search/advanced-search.model.ts')
-rw-r--r--client/src/app/search/advanced-search.model.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/client/src/app/search/advanced-search.model.ts b/client/src/app/search/advanced-search.model.ts
index 033fa9bba..5b713e145 100644
--- a/client/src/app/search/advanced-search.model.ts
+++ b/client/src/app/search/advanced-search.model.ts
@@ -4,6 +4,9 @@ export class AdvancedSearch {
4 startDate: string // ISO 8601 4 startDate: string // ISO 8601
5 endDate: string // ISO 8601 5 endDate: string // ISO 8601
6 6
7 originallyPublishedStartDate: string // ISO 8601
8 originallyPublishedEndDate: string // ISO 8601
9
7 nsfw: NSFWQuery 10 nsfw: NSFWQuery
8 11
9 categoryOneOf: string 12 categoryOneOf: string
@@ -23,6 +26,8 @@ export class AdvancedSearch {
23 constructor (options?: { 26 constructor (options?: {
24 startDate?: string 27 startDate?: string
25 endDate?: string 28 endDate?: string
29 originallyPublishedStartDate?: string
30 originallyPublishedEndDate?: string
26 nsfw?: NSFWQuery 31 nsfw?: NSFWQuery
27 categoryOneOf?: string 32 categoryOneOf?: string
28 licenceOneOf?: string 33 licenceOneOf?: string
@@ -37,6 +42,9 @@ export class AdvancedSearch {
37 42
38 this.startDate = options.startDate || undefined 43 this.startDate = options.startDate || undefined
39 this.endDate = options.endDate || undefined 44 this.endDate = options.endDate || undefined
45 this.originallyPublishedStartDate = options.originallyPublishedStartDate || undefined
46 this.originallyPublishedEndDate = options.originallyPublishedEndDate || undefined
47
40 this.nsfw = options.nsfw || undefined 48 this.nsfw = options.nsfw || undefined
41 this.categoryOneOf = options.categoryOneOf || undefined 49 this.categoryOneOf = options.categoryOneOf || undefined
42 this.licenceOneOf = options.licenceOneOf || undefined 50 this.licenceOneOf = options.licenceOneOf || undefined
@@ -66,6 +74,8 @@ export class AdvancedSearch {
66 reset () { 74 reset () {
67 this.startDate = undefined 75 this.startDate = undefined
68 this.endDate = undefined 76 this.endDate = undefined
77 this.originallyPublishedStartDate = undefined
78 this.originallyPublishedEndDate = undefined
69 this.nsfw = undefined 79 this.nsfw = undefined
70 this.categoryOneOf = undefined 80 this.categoryOneOf = undefined
71 this.licenceOneOf = undefined 81 this.licenceOneOf = undefined
@@ -82,6 +92,8 @@ export class AdvancedSearch {
82 return { 92 return {
83 startDate: this.startDate, 93 startDate: this.startDate,
84 endDate: this.endDate, 94 endDate: this.endDate,
95 originallyPublishedStartDate: this.originallyPublishedStartDate,
96 originallyPublishedEndDate: this.originallyPublishedEndDate,
85 nsfw: this.nsfw, 97 nsfw: this.nsfw,
86 categoryOneOf: this.categoryOneOf, 98 categoryOneOf: this.categoryOneOf,
87 licenceOneOf: this.licenceOneOf, 99 licenceOneOf: this.licenceOneOf,
@@ -98,6 +110,8 @@ export class AdvancedSearch {
98 return { 110 return {
99 startDate: this.startDate, 111 startDate: this.startDate,
100 endDate: this.endDate, 112 endDate: this.endDate,
113 originallyPublishedStartDate: this.originallyPublishedStartDate,
114 originallyPublishedEndDate: this.originallyPublishedEndDate,
101 nsfw: this.nsfw, 115 nsfw: this.nsfw,
102 categoryOneOf: this.intoArray(this.categoryOneOf), 116 categoryOneOf: this.intoArray(this.categoryOneOf),
103 licenceOneOf: this.intoArray(this.licenceOneOf), 117 licenceOneOf: this.intoArray(this.licenceOneOf),