Add editing for published statuses (#17320)
* Add editing for published statuses * Fix change of multiple-choice boolean in poll not resetting votes * Remove the ability to update existing media attachments for now
This commit is contained in:
parent
20a3564ab2
commit
63002cde03
25 changed files with 839 additions and 77 deletions
|
@ -20,7 +20,7 @@ class Api::V1::MediaController < Api::BaseController
|
|||
end
|
||||
|
||||
def update
|
||||
@media_attachment.update!(media_attachment_params)
|
||||
@media_attachment.update!(updateable_media_attachment_params)
|
||||
render json: @media_attachment, serializer: REST::MediaAttachmentSerializer, status: status_code_for_media_attachment
|
||||
end
|
||||
|
||||
|
@ -42,6 +42,10 @@ class Api::V1::MediaController < Api::BaseController
|
|||
params.permit(:file, :thumbnail, :description, :focus)
|
||||
end
|
||||
|
||||
def updateable_media_attachment_params
|
||||
params.permit(:thumbnail, :description, :focus)
|
||||
end
|
||||
|
||||
def file_type_error
|
||||
{ error: 'File type of uploaded media could not be verified' }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue