23 lines
507 B
Ruby
23 lines
507 B
Ruby
# frozen_string_literal: true
|
|
|
|
class TrickestPocCvesController < ApplicationController
|
|
def index
|
|
@pocs = TrickestPocCve.all
|
|
render json: @pocs.to_json
|
|
end
|
|
|
|
def show
|
|
@poc = TrickestPocCve.find_by(id: params[:id])
|
|
render json: @poc.to_json
|
|
end
|
|
|
|
def show_for_cve
|
|
@poc = TrickestPocCve.where(cve_id: params[:cve_id])
|
|
render json: @poc.to_json
|
|
end
|
|
|
|
def show_year
|
|
@cves_for_year = TrickestPocCve.from_year(params[:year])
|
|
render json: @cves_for_year.to_json
|
|
end
|
|
end
|