about summary refs log tree commit diff
path: root/app/controllers/api/v2
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-06 18:49:46 +0100
committerGitHub <noreply@github.com>2022-11-06 18:49:46 +0100
commit54101563bbadbfafd9291a867d7fbea6df3a8b7b (patch)
treefcf9a125f6ebc3ad4182fa0edcbd7101b33aebb0 /app/controllers/api/v2
parent2f8fb49d1314db931385089bc9004a48700161ad (diff)
parent21d6bc16893a9dd24c5ef54cf2f554846c8eca5b (diff)
Merge pull request #1892 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api/v2')
-rw-r--r--app/controllers/api/v2/media_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v2/media_controller.rb b/app/controllers/api/v2/media_controller.rb
index 0c1baf01d..288f847f1 100644
--- a/app/controllers/api/v2/media_controller.rb
+++ b/app/controllers/api/v2/media_controller.rb
@@ -3,7 +3,7 @@
 class Api::V2::MediaController < Api::V1::MediaController
   def create
     @media_attachment = current_account.media_attachments.create!({ delay_processing: true }.merge(media_attachment_params))
-    render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: 202
+    render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: @media_attachment.not_processed? ? 202 : 200
   rescue Paperclip::Errors::NotIdentifiedByImageMagickError
     render json: file_type_error, status: 422
   rescue Paperclip::Error