2022-04-05 22:22:23 -05:00
|
|
|
class GithubPocsController < ApplicationController
|
|
|
|
def index
|
|
|
|
@pocs = GithubPoc.all
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
|
|
|
@poc = GithubPoc.find_by(:id => params[:id])
|
|
|
|
render json: @poc.to_json
|
|
|
|
end
|
|
|
|
|
|
|
|
def show_for_cve
|
|
|
|
@poc = GithubPoc.where(:cve_id => params[:cve_id])
|
|
|
|
render json: @poc.to_json
|
|
|
|
end
|
|
|
|
|
2022-04-07 01:51:44 -05:00
|
|
|
def show_year
|
|
|
|
@cves_for_year = GithubPoc.from_year(params[:year])
|
|
|
|
render json: @cves_for_year.to_json
|
|
|
|
end
|
|
|
|
|
2022-04-05 22:22:23 -05:00
|
|
|
end
|