allow to remove template permanently

This commit is contained in:
Pete Matsyburka
2024-01-17 00:24:21 +02:00
parent bbe3942056
commit ccc06fcc3d
+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