diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-15 10:03:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-15 10:03:13 +0100 |
commit | 633868bc2c638ab15c31513bc0da7de92944bffc (patch) | |
tree | 52442b33ab7910bdb4e09a6ddae9dbe2b445bbb6 /server/helpers | |
parent | 7006bc6378eb0d480bc5b60f2c18876f0bb2a97d (diff) | |
download | PeerTube-633868bc2c638ab15c31513bc0da7de92944bffc.tar.gz PeerTube-633868bc2c638ab15c31513bc0da7de92944bffc.tar.zst PeerTube-633868bc2c638ab15c31513bc0da7de92944bffc.zip |
Fix lint
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/requests.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts index ac3559c58..e8d77b15b 100644 --- a/server/helpers/requests.ts +++ b/server/helpers/requests.ts | |||
@@ -1,13 +1,12 @@ | |||
1 | import * as Promise from 'bluebird' | 1 | import * as Promise from 'bluebird' |
2 | import { createWriteStream } from 'fs' | 2 | import { createWriteStream } from 'fs' |
3 | import { RequestResponse } from 'request' | ||
4 | import * as request from 'request' | 3 | import * as request from 'request' |
5 | import { ACTIVITY_PUB } from '../initializers' | 4 | import { ACTIVITY_PUB } from '../initializers' |
6 | import Bluebird = require('bluebird') | 5 | import Bluebird = require('bluebird') |
7 | 6 | ||
8 | function doRequest ( | 7 | function doRequest ( |
9 | requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean } | 8 | requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean } |
10 | ): Bluebird<{ response: RequestResponse, body: any }> { | 9 | ): Bluebird<{ response: request.RequestResponse, body: any }> { |
11 | if (requestOptions.activityPub === true) { | 10 | if (requestOptions.activityPub === true) { |
12 | if (!Array.isArray(requestOptions.headers)) requestOptions.headers = {} | 11 | if (!Array.isArray(requestOptions.headers)) requestOptions.headers = {} |
13 | requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER | 12 | requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER |