0
0
Fork 0

Improving feed queries, switching API to doorkeeper authentication

This commit is contained in:
Eugen Rochko 2016-03-11 16:47:36 +01:00
parent b919f39b31
commit 447cfef62d
12 changed files with 50 additions and 11 deletions

View file

@ -18,11 +18,11 @@ class PrecomputeFeedService < BaseService
end
def home(account)
Status.where(account: [account] + account.following)
Status.where(account: [account] + account.following).with_includes.with_counts
end
def mentions(account)
Status.where(id: Mention.where(account: account).pluck(:status_id))
Status.where(id: Mention.where(account: account).pluck(:status_id)).with_includes.with_counts
end
def key(type, id)