allow to remove template permanently

This commit is contained in:
Pete Matsyburka committed 2024-01-17 01:45:40 +02:00
1 parent bbe3942056
commit ccc06fcc3d
1 file changed
+5 -1
+5 -1
View File
@@ -38,7 +38,11 @@ module Api
end
def destroy
@template.update!(archived_at: Time.current)
if params[:permanently] == 'true' && !Docuseal.multitenant?
@template.destroy!
else
@template.update!(archived_at: Time.current)
end
render json: @template.as_json(only: %i[id archived_at])
end