API pagination for all collections using Link header
This commit is contained in:
parent
8d7fc5da6c
commit
b13e7dda1f
13 changed files with 123 additions and 63 deletions
|
@ -78,14 +78,6 @@ class Status < ApplicationRecord
|
|||
ids.map { |id| statuses[id].first }
|
||||
end
|
||||
|
||||
def reblogged_by(limit)
|
||||
Account.where(id: reblogs.limit(limit).pluck(:account_id)).with_counters
|
||||
end
|
||||
|
||||
def favourited_by(limit)
|
||||
Account.where(id: favourites.limit(limit).pluck(:account_id)).with_counters
|
||||
end
|
||||
|
||||
class << self
|
||||
def as_home_timeline(account)
|
||||
where(account: [account] + account.following).with_includes.with_counters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue