diff --git a/app/controllers/api/version_controller.rb b/app/controllers/api/version_controller.rb new file mode 100644 index 00000000..e817a24b --- /dev/null +++ b/app/controllers/api/version_controller.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Api + class VersionController < ApiBaseController + skip_before_action :authenticate_user! + skip_authorization_check + + def show + render json: { version: Docuseal.version } + end + end +end diff --git a/config/routes.rb b/config/routes.rb index dd568316..14ef656b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -52,6 +52,7 @@ Rails.application.routes.draw do resources :form_events, only: %i[index], path: 'form/:type' resources :submission_events, only: %i[index], path: 'submission/:type' end + get 'version', to: 'version#show' end resources :verify_pdf_signature, only: %i[create]