Files
docuseal/app/controllers/api/attachments_controller.rb
T

16 lines
401 B
Ruby
Raw Normal View History

2023-05-21 17:59:36 +03:00
# frozen_string_literal: true
module Api
class AttachmentsController < ApiBaseController
skip_before_action :authenticate_user!
def create
2023-06-18 16:30:35 +03:00
submitter = Submitter.find_by!(slug: params[:submitter_slug])
2023-05-28 23:20:48 +03:00
2023-08-12 12:34:02 +03:00
attachment = Submitters.create_attachment!(submitter, params)
2023-05-21 17:59:36 +03:00
render json: attachment.as_json(only: %i[uuid], methods: %i[url filename content_type])
end
end
end