Updates to controllers

• Updates:
- to controllers
This commit is contained in:
mgabdev
2020-08-19 17:34:17 -05:00
parent 887392879c
commit 7e81b2e132
2 changed files with 6 additions and 54 deletions

View File

@@ -9,6 +9,10 @@ class Api::V1::Statuses::ReblogsController < Api::BaseController
respond_to :json
def create
if !current_user.account.local? || !status_for_reblog.local
return render json: { error: 'Invalid action' }, status: 422
end
@status = ReblogService.new.call(current_user.account, status_for_reblog, reblog_params)
render json: @status, serializer: REST::StatusSerializer
end