diff options
author | Chocobozzz <me@florianbigard.com> | 2020-07-08 15:51:46 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-10 14:02:41 +0200 |
commit | 310b5219b38427f0c2c7ba57225afdd8f3064380 (patch) | |
tree | 853ff7e4e66425ca47b0999384eeb08ed14b28ff /shared/extra-utils/moderation/abuses.ts | |
parent | 811cef146c841ef8530bc812c05dfee77e0f2998 (diff) | |
download | PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.tar.gz PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.tar.zst PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.zip |
Add new abuses tests
Diffstat (limited to 'shared/extra-utils/moderation/abuses.ts')
-rw-r--r-- | shared/extra-utils/moderation/abuses.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/shared/extra-utils/moderation/abuses.ts b/shared/extra-utils/moderation/abuses.ts index 1af703f92..62af9556e 100644 --- a/shared/extra-utils/moderation/abuses.ts +++ b/shared/extra-utils/moderation/abuses.ts | |||
@@ -57,10 +57,15 @@ function reportAbuse (options: { | |||
57 | function getAbusesList (options: { | 57 | function getAbusesList (options: { |
58 | url: string | 58 | url: string |
59 | token: string | 59 | token: string |
60 | |||
61 | start?: number | ||
62 | count?: number | ||
63 | sort?: string | ||
64 | |||
60 | id?: number | 65 | id?: number |
61 | predefinedReason?: AbusePredefinedReasonsString | 66 | predefinedReason?: AbusePredefinedReasonsString |
62 | search?: string | 67 | search?: string |
63 | filter?: AbuseFilter, | 68 | filter?: AbuseFilter |
64 | state?: AbuseState | 69 | state?: AbuseState |
65 | videoIs?: AbuseVideoIs | 70 | videoIs?: AbuseVideoIs |
66 | searchReporter?: string | 71 | searchReporter?: string |
@@ -71,6 +76,9 @@ function getAbusesList (options: { | |||
71 | const { | 76 | const { |
72 | url, | 77 | url, |
73 | token, | 78 | token, |
79 | start, | ||
80 | count, | ||
81 | sort, | ||
74 | id, | 82 | id, |
75 | predefinedReason, | 83 | predefinedReason, |
76 | search, | 84 | search, |
@@ -85,13 +93,15 @@ function getAbusesList (options: { | |||
85 | const path = '/api/v1/abuses' | 93 | const path = '/api/v1/abuses' |
86 | 94 | ||
87 | const query = { | 95 | const query = { |
88 | sort: 'createdAt', | ||
89 | id, | 96 | id, |
90 | predefinedReason, | 97 | predefinedReason, |
91 | search, | 98 | search, |
92 | state, | 99 | state, |
93 | filter, | 100 | filter, |
94 | videoIs, | 101 | videoIs, |
102 | start, | ||
103 | count, | ||
104 | sort: sort || 'createdAt', | ||
95 | searchReporter, | 105 | searchReporter, |
96 | searchReportee, | 106 | searchReportee, |
97 | searchVideo, | 107 | searchVideo, |