mirror of https://github.com/Chocobozzz/PeerTube
Fix lint
parent
7006bc6378
commit
633868bc2c
|
@ -1,13 +1,12 @@
|
||||||
import * as Promise from 'bluebird'
|
import * as Promise from 'bluebird'
|
||||||
import { createWriteStream } from 'fs'
|
import { createWriteStream } from 'fs'
|
||||||
import { RequestResponse } from 'request'
|
|
||||||
import * as request from 'request'
|
import * as request from 'request'
|
||||||
import { ACTIVITY_PUB } from '../initializers'
|
import { ACTIVITY_PUB } from '../initializers'
|
||||||
import Bluebird = require('bluebird')
|
import Bluebird = require('bluebird')
|
||||||
|
|
||||||
function doRequest (
|
function doRequest (
|
||||||
requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean }
|
requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean }
|
||||||
): Bluebird<{ response: RequestResponse, body: any }> {
|
): Bluebird<{ response: request.RequestResponse, body: any }> {
|
||||||
if (requestOptions.activityPub === true) {
|
if (requestOptions.activityPub === true) {
|
||||||
if (!Array.isArray(requestOptions.headers)) requestOptions.headers = {}
|
if (!Array.isArray(requestOptions.headers)) requestOptions.headers = {}
|
||||||
requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER
|
requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER
|
||||||
|
|
Loading…
Reference in New Issue