1234567891011121314151617181920212223242526272829303132 |
- class SystemReportController < ApplicationController
- prepend_before_action :authenticate_and_authorize!
-
- def index
- render json: {
- descriptions: SystemReport.descriptions,
- fetch: SystemReport.fetch
- }
- end
-
- def download
- instance = SystemReport.fetch_with_create
- send_data(
- instance.data.to_json,
- filename: instance.filename,
- type: 'application/json',
- disposition: 'attachment'
- )
- end
-
- def plugins
- render json: { plugins: SystemReport.plugins }
- end
- end
|