API methods for retrieving home and mentions timelines
This commit is contained in:
parent
f099bc6091
commit
fe57f6330f
5 changed files with 18 additions and 1 deletions
|
@ -20,4 +20,12 @@ class Api::StatusesController < ApiController
|
|||
@status = FavouriteService.new.(current_user.account, Status.find(params[:id])).status
|
||||
render action: :show
|
||||
end
|
||||
|
||||
def home
|
||||
@statuses = Status.where(account: [current_user.account] + current_user.account.following).order('created_at desc')
|
||||
end
|
||||
|
||||
def mentions
|
||||
@statuses = Status.where(id: Mention.where(account: current_user.account).pluck(:status_id)).order('created_at desc')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue