Setting up preliminary "detailed" routes in the UI, new API end-point for fetching status context
This commit is contained in:
parent
2e7aac793a
commit
5b0cef9781
13 changed files with 400 additions and 12 deletions
|
@ -6,6 +6,12 @@ class Api::StatusesController < ApiController
|
|||
@status = Status.find(params[:id])
|
||||
end
|
||||
|
||||
def context
|
||||
@status = Status.find(params[:id])
|
||||
@ancestors = @status.ancestors.with_includes.with_counters
|
||||
@descendants = @status.descendants.with_includes.with_counters
|
||||
end
|
||||
|
||||
def create
|
||||
@status = PostStatusService.new.(current_user.account, params[:status], params[:in_reply_to_id].blank? ? nil : Status.find(params[:in_reply_to_id]), params[:media_ids])
|
||||
render action: :show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue