Class: Api::V2::CveScansController
- Inherits:
-
V2::BaseController
- Object
- V2::BaseController
- Api::V2::CveScansController
- Defined in:
- app/controllers/api/v2/cve_scans_controller.rb
Overview
API controller for CVE scans per host.
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
42 43 44 45 |
# File 'app/controllers/api/v2/cve_scans_controller.rb', line 42 def destroy @cve_scan = resource_class.for_host(@host.id).find(params[:id]) process_response @cve_scan.destroy end |
#index ⇒ Object
18 19 20 |
# File 'app/controllers/api/v2/cve_scans_controller.rb', line 18 def index @cve_scans = cve_scans_index_scope.paginate() end |
#latest ⇒ Object
25 26 27 28 |
# File 'app/controllers/api/v2/cve_scans_controller.rb', line 25 def latest @cve_scan = cve_scans_index_scope.first head :no_content if @cve_scan.nil? end |
#resource_class ⇒ Object
9 10 11 |
# File 'app/controllers/api/v2/cve_scans_controller.rb', line 9 def resource_class ::ForemanCveScanner::CveScan end |
#show ⇒ Object
34 35 36 |
# File 'app/controllers/api/v2/cve_scans_controller.rb', line 34 def show @cve_scan = resource_class.for_host(@host.id).find(params[:id]) end |