mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
24 lines
510 B
Ruby
24 lines
510 B
Ruby
|
module ClientApi
|
||
|
class ConfigurationsController < ApplicationController
|
||
|
|
||
|
def about_scinote
|
||
|
respond_to do |format|
|
||
|
format.json do
|
||
|
render json: {
|
||
|
scinoteVersion: Scinote::Application::VERSION,
|
||
|
addons: list_all_addons
|
||
|
}, status: :ok
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def list_all_addons
|
||
|
Rails::Engine.subclasses
|
||
|
.select { |c| c.name.start_with?('Scinote') }
|
||
|
.map(&:parent)
|
||
|
end
|
||
|
end
|
||
|
end
|