diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-28 16:51:25 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-28 16:51:25 +0100 |
commit | 366caf8b71f3d82336b6ac243845c783ef673fc1 (patch) | |
tree | 4a685d1177802dac160c6e758fd650c059b84a5d /server/lib | |
parent | 3637106d7af7a72a9ec80a6b2769c6241f60d909 (diff) | |
download | PeerTube-366caf8b71f3d82336b6ac243845c783ef673fc1.tar.gz PeerTube-366caf8b71f3d82336b6ac243845c783ef673fc1.tar.zst PeerTube-366caf8b71f3d82336b6ac243845c783ef673fc1.zip |
Fix build with typescript 3.8
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/share.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/video-comments.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/video-rates.ts | 2 | ||||
-rw-r--r-- | server/lib/plugins/plugin-index.ts | 4 | ||||
-rw-r--r-- | server/lib/schedulers/auto-follow-index-instances.ts | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts index e847c4b7d..a7c645062 100644 --- a/server/lib/activitypub/share.ts +++ b/server/lib/activitypub/share.ts | |||
@@ -36,7 +36,7 @@ async function addVideoShares (shareUrls: string[], video: MVideoId) { | |||
36 | await Bluebird.map(shareUrls, async shareUrl => { | 36 | await Bluebird.map(shareUrls, async shareUrl => { |
37 | try { | 37 | try { |
38 | // Fetch url | 38 | // Fetch url |
39 | const { body } = await doRequest({ | 39 | const { body } = await doRequest<any>({ |
40 | uri: shareUrl, | 40 | uri: shareUrl, |
41 | json: true, | 41 | json: true, |
42 | activityPub: true | 42 | activityPub: true |
diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts index 8642d2432..3aee6799e 100644 --- a/server/lib/activitypub/video-comments.ts +++ b/server/lib/activitypub/video-comments.ts | |||
@@ -120,7 +120,7 @@ async function resolveParentComment (params: ResolveThreadParams) { | |||
120 | throw new Error('Recursion limit reached when resolving a thread') | 120 | throw new Error('Recursion limit reached when resolving a thread') |
121 | } | 121 | } |
122 | 122 | ||
123 | const { body } = await doRequest({ | 123 | const { body } = await doRequest<any>({ |
124 | uri: url, | 124 | uri: url, |
125 | json: true, | 125 | json: true, |
126 | activityPub: true | 126 | activityPub: true |
diff --git a/server/lib/activitypub/video-rates.ts b/server/lib/activitypub/video-rates.ts index 79ccfbc7e..202368c8f 100644 --- a/server/lib/activitypub/video-rates.ts +++ b/server/lib/activitypub/video-rates.ts | |||
@@ -18,7 +18,7 @@ async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateTy | |||
18 | await Bluebird.map(ratesUrl, async rateUrl => { | 18 | await Bluebird.map(ratesUrl, async rateUrl => { |
19 | try { | 19 | try { |
20 | // Fetch url | 20 | // Fetch url |
21 | const { body } = await doRequest({ | 21 | const { body } = await doRequest<any>({ |
22 | uri: rateUrl, | 22 | uri: rateUrl, |
23 | json: true, | 23 | json: true, |
24 | activityPub: true | 24 | activityPub: true |
diff --git a/server/lib/plugins/plugin-index.ts b/server/lib/plugins/plugin-index.ts index dcdfba28c..170f0c7e2 100644 --- a/server/lib/plugins/plugin-index.ts +++ b/server/lib/plugins/plugin-index.ts | |||
@@ -27,7 +27,7 @@ async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList) | |||
27 | const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins' | 27 | const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins' |
28 | 28 | ||
29 | try { | 29 | try { |
30 | const { body } = await doRequest({ uri, qs, json: true }) | 30 | const { body } = await doRequest<any>({ uri, qs, json: true }) |
31 | 31 | ||
32 | logger.debug('Got result from PeerTube index.', { body }) | 32 | logger.debug('Got result from PeerTube index.', { body }) |
33 | 33 | ||
@@ -57,7 +57,7 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePlu | |||
57 | 57 | ||
58 | const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version' | 58 | const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version' |
59 | 59 | ||
60 | const { body } = await doRequest({ uri, body: bodyRequest, json: true, method: 'POST' }) | 60 | const { body } = await doRequest<any>({ uri, body: bodyRequest, json: true, method: 'POST' }) |
61 | 61 | ||
62 | return body | 62 | return body |
63 | } | 63 | } |
diff --git a/server/lib/schedulers/auto-follow-index-instances.ts b/server/lib/schedulers/auto-follow-index-instances.ts index d700a99f0..a1f5e4a91 100644 --- a/server/lib/schedulers/auto-follow-index-instances.ts +++ b/server/lib/schedulers/auto-follow-index-instances.ts | |||
@@ -41,7 +41,7 @@ export class AutoFollowIndexInstances extends AbstractScheduler { | |||
41 | 41 | ||
42 | this.lastCheck = new Date() | 42 | this.lastCheck = new Date() |
43 | 43 | ||
44 | const { body } = await doRequest({ uri, qs, json: true }) | 44 | const { body } = await doRequest<any>({ uri, qs, json: true }) |
45 | 45 | ||
46 | const hosts: string[] = body.data.map(o => o.host) | 46 | const hosts: string[] = body.data.map(o => o.host) |
47 | const chunks = chunk(hosts, 20) | 47 | const chunks = chunk(hosts, 20) |