diff options
author | Chocobozzz <me@florianbigard.com> | 2021-09-07 15:16:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-09-07 15:16:26 +0200 |
commit | fb72d2e1c24cd4660fd6611ef723c5827c47294c (patch) | |
tree | c2a2991a9e6944cd3d22c87e34de096a47b8db9e /shared/extra-utils/requests | |
parent | 6f9719b568fad75959a1404b6927b7a278061c41 (diff) | |
download | PeerTube-fb72d2e1c24cd4660fd6611ef723c5827c47294c.tar.gz PeerTube-fb72d2e1c24cd4660fd6611ef723c5827c47294c.tar.zst PeerTube-fb72d2e1c24cd4660fd6611ef723c5827c47294c.zip |
Fix infohash with object storage
Diffstat (limited to 'shared/extra-utils/requests')
-rw-r--r-- | shared/extra-utils/requests/requests.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/extra-utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts index 60a08b13c..5bbf7f3bf 100644 --- a/shared/extra-utils/requests/requests.ts +++ b/shared/extra-utils/requests/requests.ts | |||
@@ -29,9 +29,12 @@ function makeRawRequest (url: string, expectedStatus?: HttpStatusCode, range?: s | |||
29 | 29 | ||
30 | function makeGetRequest (options: CommonRequestParams & { | 30 | function makeGetRequest (options: CommonRequestParams & { |
31 | query?: any | 31 | query?: any |
32 | rawQuery?: string | ||
32 | }) { | 33 | }) { |
33 | const req = request(options.url).get(options.path) | 34 | const req = request(options.url).get(options.path) |
34 | .query(options.query) | 35 | |
36 | if (options.query) req.query(options.query) | ||
37 | if (options.rawQuery) req.query(options.rawQuery) | ||
35 | 38 | ||
36 | return buildRequest(req, { contentType: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options }) | 39 | return buildRequest(req, { contentType: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options }) |
37 | } | 40 | } |