diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-16 15:38:09 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-16 15:49:16 +0100 |
commit | babecc3c09cd4ed06fe643a97fff4bcc31c5a9be (patch) | |
tree | ab927227a1d66dac6eb720d7ec8f2e944c51ea26 /server/models | |
parent | 8d4273463fb19d503b1aa0a32dc289f292ed614e (diff) | |
download | PeerTube-babecc3c09cd4ed06fe643a97fff4bcc31c5a9be.tar.gz PeerTube-babecc3c09cd4ed06fe643a97fff4bcc31c5a9be.tar.zst PeerTube-babecc3c09cd4ed06fe643a97fff4bcc31c5a9be.zip |
Fix AP collections pagination
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor-follow.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index 3373355ef..0a6935083 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -509,12 +509,12 @@ export class ActorFollowModel extends Model<ActorFollowModel> { | |||
509 | tasks.push(ActorFollowModel.sequelize.query(query, options)) | 509 | tasks.push(ActorFollowModel.sequelize.query(query, options)) |
510 | } | 510 | } |
511 | 511 | ||
512 | const [ followers, [ { total } ] ] = await Promise.all(tasks) | 512 | const [ followers, [ dataTotal ] ] = await Promise.all(tasks) |
513 | const urls: string[] = followers.map(f => f.url) | 513 | const urls: string[] = followers.map(f => f.url) |
514 | 514 | ||
515 | return { | 515 | return { |
516 | data: urls, | 516 | data: urls, |
517 | total: parseInt(total, 10) | 517 | total: dataTotal ? parseInt(dataTotal.total, 10) : 0 |
518 | } | 518 | } |
519 | } | 519 | } |
520 | 520 | ||