adjust capture revision

This commit is contained in:
Pete Matsyburka
2026-05-15 17:50:18 +03:00
parent 41604008d1
commit 755decca27
4 changed files with 22 additions and 7 deletions
-2
View File
@@ -77,8 +77,6 @@ class TemplatesController < ApplicationController
WebhookUrls.enqueue_events(@template, 'template.updated')
TemplateVersions.find_or_create_for(@template, author: current_user) if params[:revision]
head :ok
end
@@ -14,4 +14,12 @@ class TemplatesVersionsController < ApplicationController
render json: TemplateVersions.serialize(version)
end
def create
authorize!(:update, @template)
TemplateVersions.find_or_create_for(@template, author: current_user)
head :ok
end
end