mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
add revisions
This commit is contained in:
1 parent
04ec2f8260
commit
10fd624bec
16 files changed
+462
-17
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TemplatesVersionsController < ApplicationController
|
||||
load_and_authorize_resource :template
|
||||
|
||||
def index
|
||||
versions = @template.template_versions.order(id: :desc).preload(:author)
|
||||
|
||||
render json: versions.as_json(TemplateVersions::SERIALIZE_PARAMS)
|
||||
end
|
||||
|
||||
def show
|
||||
version = @template.template_versions.find(params[:id])
|
||||
|
||||
render json: TemplateVersions.serialize(version)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user