mirror of
https://github.com/docusealco/docuseal.git
synced 2026-08-07 07:14:43 +00:00
23 lines
604 B
Ruby
23 lines
604 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
class TemplatesController < ApiBaseController
|
|
def update
|
|
@template = current_account.templates.find(params[:id])
|
|
|
|
@template.update!(template_params)
|
|
|
|
render :ok
|
|
end
|
|
|
|
private
|
|
|
|
def template_params
|
|
params.require(:template).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
|