diff --git a/app/controllers/github_pocs_controller.rb b/app/controllers/github_pocs_controller.rb new file mode 100644 index 0000000..79861ca --- /dev/null +++ b/app/controllers/github_pocs_controller.rb @@ -0,0 +1,16 @@ +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 + +end diff --git a/app/views/github_pocs/index.html.erb b/app/views/github_pocs/index.html.erb new file mode 100644 index 0000000..864544d --- /dev/null +++ b/app/views/github_pocs/index.html.erb @@ -0,0 +1 @@ +