diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-25 11:04:18 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 11:07:56 +0100 |
commit | 18490b07650d77d7fe376970b749af5a8c672fd6 (patch) | |
tree | 89741e63e34c2659487c9afa8309755064cb0c39 /shared/extra-utils/feeds/feeds.ts | |
parent | 5beb89f223539f1e415a976ff104f772526b4d20 (diff) | |
download | PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.tar.gz PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.tar.zst PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.zip |
Fix migration and test
Diffstat (limited to 'shared/extra-utils/feeds/feeds.ts')
-rw-r--r-- | shared/extra-utils/feeds/feeds.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/feeds/feeds.ts b/shared/extra-utils/feeds/feeds.ts index bafbb9f94..957d4499c 100644 --- a/shared/extra-utils/feeds/feeds.ts +++ b/shared/extra-utils/feeds/feeds.ts | |||
@@ -13,14 +13,14 @@ function getXMLfeed (url: string, feed: FeedType, format?: string) { | |||
13 | .expect('Content-Type', /xml/) | 13 | .expect('Content-Type', /xml/) |
14 | } | 14 | } |
15 | 15 | ||
16 | function getJSONfeed (url: string, feed: FeedType, query: any = {}) { | 16 | function getJSONfeed (url: string, feed: FeedType, query: any = {}, statusCodeExpected = 200) { |
17 | const path = '/feeds/' + feed + '.json' | 17 | const path = '/feeds/' + feed + '.json' |
18 | 18 | ||
19 | return request(url) | 19 | return request(url) |
20 | .get(path) | 20 | .get(path) |
21 | .query(query) | 21 | .query(query) |
22 | .set('Accept', 'application/json') | 22 | .set('Accept', 'application/json') |
23 | .expect(200) | 23 | .expect(statusCodeExpected) |
24 | .expect('Content-Type', /json/) | 24 | .expect('Content-Type', /json/) |
25 | } | 25 | } |
26 | 26 | ||