aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/videos/video-blacklist.ts
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2019-04-02 05:26:47 -0400
committerChocobozzz <chocobozzz@cpy.re>2019-04-02 11:26:47 +0200
commit7ccddd7b5250bd25a917a6e77e58b87b9484a2a4 (patch)
treee75dc991369c1768804fefa114eb2a832881087f /shared/utils/videos/video-blacklist.ts
parent12fed49ebab0c414713d57ea316b6488ae6bef99 (diff)
downloadPeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.gz
PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.zst
PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.zip
add quarantine videos feature (#1637)
* add quarantine videos feature * increase Notification settings test timeout to 20000ms. was completing 7000 locally but timing out after 10000 on travis * fix quarantine video test issues -propagate misspelling -remove skip from server/tests/client.ts * WIP use blacklist for moderator video approval instead of video.quarantine boolean * finish auto-blacklist feature
Diffstat (limited to 'shared/utils/videos/video-blacklist.ts')
-rw-r--r--shared/utils/videos/video-blacklist.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/shared/utils/videos/video-blacklist.ts b/shared/utils/videos/video-blacklist.ts
index f2ae0ed26..82d5b7e31 100644
--- a/shared/utils/videos/video-blacklist.ts
+++ b/shared/utils/videos/video-blacklist.ts
@@ -51,6 +51,18 @@ function getBlacklistedVideosList (url: string, token: string, specialStatus = 2
51 .expect('Content-Type', /json/) 51 .expect('Content-Type', /json/)
52} 52}
53 53
54function getBlacklistedVideosListWithTypeFilter (url: string, token: string, type: number, specialStatus = 200) {
55 const path = '/api/v1/videos/blacklist/'
56
57 return request(url)
58 .get(path)
59 .query({ sort: 'createdAt', type })
60 .set('Accept', 'application/json')
61 .set('Authorization', 'Bearer ' + token)
62 .expect(specialStatus)
63 .expect('Content-Type', /json/)
64}
65
54function getSortedBlacklistedVideosList (url: string, token: string, sort: string, specialStatus = 200) { 66function getSortedBlacklistedVideosList (url: string, token: string, sort: string, specialStatus = 200) {
55 const path = '/api/v1/videos/blacklist/' 67 const path = '/api/v1/videos/blacklist/'
56 68
@@ -69,6 +81,7 @@ export {
69 addVideoToBlacklist, 81 addVideoToBlacklist,
70 removeVideoFromBlacklist, 82 removeVideoFromBlacklist,
71 getBlacklistedVideosList, 83 getBlacklistedVideosList,
84 getBlacklistedVideosListWithTypeFilter,
72 getSortedBlacklistedVideosList, 85 getSortedBlacklistedVideosList,
73 updateVideoBlacklist 86 updateVideoBlacklist
74} 87}