0
0
Fork 0

Fix Rails/ActionOrder cop (#24692)

This commit is contained in:
Matt Jankowski 2023-04-30 00:46:39 -04:00 committed by GitHub
parent 470b8abb69
commit 6e226f5a32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 93 additions and 120 deletions

View file

@ -6,6 +6,10 @@ class Api::V1::MediaController < Api::BaseController
before_action :set_media_attachment, except: [:create]
before_action :check_processing, except: [:create]
def show
render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: status_code_for_media_attachment
end
def create
@media_attachment = current_account.media_attachments.create!(media_attachment_params)
render json: @media_attachment, serializer: REST::MediaAttachmentSerializer
@ -15,10 +19,6 @@ class Api::V1::MediaController < Api::BaseController
render json: processing_error, status: 500
end
def show
render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: status_code_for_media_attachment
end
def update
@media_attachment.update!(updateable_media_attachment_params)
render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: status_code_for_media_attachment