mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
23 lines
522 B
Ruby
23 lines
522 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 { |c| c.parent.to_s }
|
|
end
|
|
end
|
|
end
|