From 366caf8b71f3d82336b6ac243845c783ef673fc1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 28 Feb 2020 16:51:25 +0100 Subject: Fix build with typescript 3.8 --- server/initializers/migrations/0135-video-channel-actor.ts | 2 +- server/lib/activitypub/share.ts | 2 +- server/lib/activitypub/video-comments.ts | 2 +- server/lib/activitypub/video-rates.ts | 2 +- server/lib/plugins/plugin-index.ts | 4 ++-- server/lib/schedulers/auto-follow-index-instances.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/initializers/migrations/0135-video-channel-actor.ts b/server/initializers/migrations/0135-video-channel-actor.ts index c0c343384..3f620dfa3 100644 --- a/server/initializers/migrations/0135-video-channel-actor.ts +++ b/server/initializers/migrations/0135-video-channel-actor.ts @@ -240,7 +240,7 @@ async function up (utils: { { const query = 'SELECT * FROM "actor" WHERE "serverId" IS NULL AND "publicKey" IS NULL' const options = { type: Sequelize.QueryTypes.SELECT as Sequelize.QueryTypes.SELECT } - const [ res ] = await utils.sequelize.query(query, options) + const [ res ] = await utils.sequelize.query(query, options) for (const actor of res) { const { privateKey, publicKey } = await createPrivateAndPublicKeys() 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) { await Bluebird.map(shareUrls, async shareUrl => { try { // Fetch url - const { body } = await doRequest({ + const { body } = await doRequest({ uri: shareUrl, json: true, 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) { throw new Error('Recursion limit reached when resolving a thread') } - const { body } = await doRequest({ + const { body } = await doRequest({ uri: url, json: true, 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 await Bluebird.map(ratesUrl, async rateUrl => { try { // Fetch url - const { body } = await doRequest({ + const { body } = await doRequest({ uri: rateUrl, json: true, 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) const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins' try { - const { body } = await doRequest({ uri, qs, json: true }) + const { body } = await doRequest({ uri, qs, json: true }) logger.debug('Got result from PeerTube index.', { body }) @@ -57,7 +57,7 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise({ uri, body: bodyRequest, json: true, method: 'POST' }) return body } 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 { this.lastCheck = new Date() - const { body } = await doRequest({ uri, qs, json: true }) + const { body } = await doRequest({ uri, qs, json: true }) const hosts: string[] = body.data.map(o => o.host) const chunks = chunk(hosts, 20) -- cgit v1.2.3