mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 22:52:32 -05:00
rename to templates
This commit is contained in:
1 parent
98fc9d964a
commit
4a303cb423
59 files changed
+248
-264
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# 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
|
||||
Reference in new issue
Block a user