main
1module Api
2 module Agents
3 class FilesController < ApiController
4 before_action do
5 request.format = :json
6 end
7
8 def show
9 @agent = Agent.find(params[:agent_id])
10 @fingerprint = params[:id]
11 @file = Disposition.find_by(fingerprint: params[:id])
12 publish(EventMessage.new(
13 agent_id: @agent.id,
14 event_type: :scanned,
15 data: params[:data]
16 ))
17 end
18 end
19 end
20end