Handle pagination for the federated actions & followers responses (#1731)

* Add pagination for admin social list

* Use Paginated API for followers tab on frontend
This commit is contained in:
Gabe Kangas
2022-03-06 17:18:51 -08:00
committed by GitHub
parent bdae263819
commit 5e6bc50b59
12 changed files with 118 additions and 38 deletions

View File

@@ -280,6 +280,17 @@ func (q *Queries) GetInboundActivitiesWithOffset(ctx context.Context, arg GetInb
return items, nil
}
const getInboundActivityCount = `-- name: GetInboundActivityCount :one
SELECT count(*) FROM ap_accepted_activities
`
func (q *Queries) GetInboundActivityCount(ctx context.Context) (int64, error) {
row := q.db.QueryRowContext(ctx, getInboundActivityCount)
var count int64
err := row.Scan(&count)
return count, err
}
const getLocalPostCount = `-- name: GetLocalPostCount :one
SElECT count(*) FROM ap_outbox
`