Files
docuseal/app/controllers/api/flows_controller.rb
T
Alex Turchyn 97c462ead2 initial commit
2023-06-01 00:00:58 +03:00

23 lines
564 B
Ruby

# frozen_string_literal: true
module Api
class FlowsController < ApiBaseController
def update
@flow = current_account.flows.find(params[:id])
@flow.update!(flow_params)
render :ok
end
private
def flow_params
params.require(:flow).permit(:name,
schema: [%i[attachment_uuid name]],
fields: [[:uuid, :name, :type, :required,
{ options: [], areas: [%i[x y w h attachment_uuid page]] }]])
end
end
end