21 lines
427 B
Ruby
21 lines
427 B
Ruby
class CvemonCvesController < ApplicationController
|
|
def index
|
|
@pocs = CvemonCve.all
|
|
end
|
|
|
|
def show
|
|
@poc = CvemonCve.find_by(:id => params[:id])
|
|
render json: @poc.to_json
|
|
end
|
|
|
|
def show_for_cve
|
|
@poc = CvemonCve.where(:cve_id => params[:cve_id])
|
|
render json: @poc.to_json
|
|
end
|
|
|
|
def show_year
|
|
@cves_for_year = CvemonCve.from_year(params[:year])
|
|
render json: @cves_for_year.to_json
|
|
end
|
|
|
|
end
|