Add visibility
param to reblog REST API (#9851)
Use async worker for creating reblog notification to improve performance
This commit is contained in:
parent
317c43b75b
commit
ba84b6d4d7
3 changed files with 10 additions and 4 deletions
|
@ -9,7 +9,7 @@ class Api::V1::Statuses::ReblogsController < Api::BaseController
|
|||
respond_to :json
|
||||
|
||||
def create
|
||||
@status = ReblogService.new.call(current_user.account, status_for_reblog)
|
||||
@status = ReblogService.new.call(current_user.account, status_for_reblog, reblog_params)
|
||||
render json: @status, serializer: REST::StatusSerializer
|
||||
end
|
||||
|
||||
|
@ -32,4 +32,8 @@ class Api::V1::Statuses::ReblogsController < Api::BaseController
|
|||
def status_for_destroy
|
||||
current_user.account.statuses.where(reblog_of_id: params[:status_id]).first!
|
||||
end
|
||||
|
||||
def reblog_params
|
||||
params.permit(:visibility)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue