data_importer/app/controllers/cves_controller.rb

16 lines
291 B
Ruby
Raw Normal View History

2022-04-04 13:18:03 -05:00
class CvesController < ApplicationController
def index
@cves = Cve.all
end
def show
@cve = Cve.find_by_id(params[:cve_id])
render json: @cve.to_json
end
def show_year
@cves_for_year = Cve.from_year(params[:year])
render json: @cves_for_year.to_json
2022-04-04 13:18:03 -05:00
end
end