mirror of
https://github.com/docusealco/docuseal.git
synced 2026-06-23 04:10:11 +00:00
23 lines
564 B
Ruby
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
|