]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/activitypub/actor-follow.ts
Improve torrent/video download
[github/Chocobozzz/PeerTube.git] / server / models / activitypub / actor-follow.ts
index d3c438626ad35a58463ad7f64443c6be44780654..b8ce6de1d7fb8ddd67afa1c80c987909491d8601 100644 (file)
@@ -118,12 +118,12 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
 
     if (goodInboxes.length !== 0) {
       ActorFollowModel.incrementScores(goodInboxes, ACTOR_FOLLOW_SCORE.BONUS, t)
-        .catch(err => logger.error('Cannot increment scores of good actor follows.', err))
+        .catch(err => logger.error('Cannot increment scores of good actor follows.', { err }))
     }
 
     if (badInboxes.length !== 0) {
       ActorFollowModel.incrementScores(badInboxes, ACTOR_FOLLOW_SCORE.PENALTY, t)
-        .catch(err => logger.error('Cannot decrement scores of bad actor follows.', err))
+        .catch(err => logger.error('Cannot decrement scores of bad actor follows.', { err }))
     }
   }
 
@@ -335,8 +335,7 @@ export class ActorFollowModel extends Model<ActorFollowModel> {
       tasks.push(ActorFollowModel.sequelize.query(query, options))
     }
 
-    const [ followers, [ { total } ] ] = await
-    Promise.all(tasks)
+    const [ followers, [ { total } ] ] = await Promise.all(tasks)
     const urls: string[] = followers.map(f => f.url)
 
     return {