summaryrefslogtreecommitdiff
path: root/app/controllers/agents/files_controller.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-09 19:43:03 -0700
committermo khan <mo@mokhan.ca>2015-02-09 19:43:03 -0700
commit594d37bb40f3e3e0f15553383cf2a305d4d6742e (patch)
tree6236972f334d3ad778fbd51948d9635ae1226936 /app/controllers/agents/files_controller.rb
parent72a1483c8f546fae6c93dcdf91cfd47c37bc2f90 (diff)
extract api.
Diffstat (limited to 'app/controllers/agents/files_controller.rb')
-rw-r--r--app/controllers/agents/files_controller.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/app/controllers/agents/files_controller.rb b/app/controllers/agents/files_controller.rb
deleted file mode 100644
index 0f493fb..0000000
--- a/app/controllers/agents/files_controller.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-module Agents
- class FilesController < ApplicationController
- before_action :load_agent
- before_action do
- request.format = :json
- end
-
- def index
- end
-
- def show
- @fingerprint = params[:id]
- @file = Disposition.find_by(fingerprint: params[:id])
- message = {
- agent_id: params[:id],
- type: :lookup,
- data: params[:data]
- }
- Publisher.publish("events.scanned.#{@agent.id}", message)
- end
-
- private
-
- def load_agent
- @agent = Agent.find(params[:agent_id])
- end
- end
-end