blob: 1329d049e3a36676c84edb068ae26e73a0905aa6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
module Api
module Agents
class FilesController < ApplicationController
before_action do
request.format = :json
end
def show
@agent = Agent.find(params[:agent_id])
@fingerprint = params[:id]
@file = Disposition.find_by(fingerprint: params[:id])
message = {
agent_id: @agent.id,
type: :lookup,
data: params[:data]
}
Publisher.publish("events.scanned.#{@agent.id}", message)
end
end
end
end
|