aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-02-28 16:51:25 +0100
committerChocobozzz <me@florianbigard.com>2020-02-28 16:51:25 +0100
commit366caf8b71f3d82336b6ac243845c783ef673fc1 (patch)
tree4a685d1177802dac160c6e758fd650c059b84a5d /server
parent3637106d7af7a72a9ec80a6b2769c6241f60d909 (diff)
downloadPeerTube-366caf8b71f3d82336b6ac243845c783ef673fc1.tar.gz
PeerTube-366caf8b71f3d82336b6ac243845c783ef673fc1.tar.zst
PeerTube-366caf8b71f3d82336b6ac243845c783ef673fc1.zip
Fix build with typescript 3.8
Diffstat (limited to 'server')
-rw-r--r--server/initializers/migrations/0135-video-channel-actor.ts2
-rw-r--r--server/lib/activitypub/share.ts2
-rw-r--r--server/lib/activitypub/video-comments.ts2
-rw-r--r--server/lib/activitypub/video-rates.ts2
-rw-r--r--server/lib/plugins/plugin-index.ts4
-rw-r--r--server/lib/schedulers/auto-follow-index-instances.ts2
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: {
240 { 240 {
241 const query = 'SELECT * FROM "actor" WHERE "serverId" IS NULL AND "publicKey" IS NULL' 241 const query = 'SELECT * FROM "actor" WHERE "serverId" IS NULL AND "publicKey" IS NULL'
242 const options = { type: Sequelize.QueryTypes.SELECT as Sequelize.QueryTypes.SELECT } 242 const options = { type: Sequelize.QueryTypes.SELECT as Sequelize.QueryTypes.SELECT }
243 const [ res ] = await utils.sequelize.query(query, options) 243 const [ res ] = await utils.sequelize.query<any>(query, options)
244 244
245 for (const actor of res) { 245 for (const actor of res) {
246 const { privateKey, publicKey } = await createPrivateAndPublicKeys() 246 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) {
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)