Updated media attachment on create to always include account param
This commit is contained in:
parent
956c06ea59
commit
6b4969dbdd
@ -10,7 +10,7 @@ class Api::V1::MediaController < Api::BaseController
|
||||
respond_to :json
|
||||
|
||||
def create
|
||||
@media = current_account.media_attachments.create!(media_params)
|
||||
@media = current_account.media_attachments.create!(account: current_account, file: media_params[:file], description: media_params[:description], focus: media_params[:focus])
|
||||
render json: @media, serializer: REST::MediaAttachmentSerializer
|
||||
rescue Paperclip::Errors::NotIdentifiedByImageMagickError
|
||||
render json: file_type_error, status: 422
|
||||
|
Loading…
x
Reference in New Issue
Block a user