summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-04 23:01:33 -0700
committermo khan <mo@mokhan.ca>2015-02-04 23:01:33 -0700
commit5e6e2246203d6894a18447aef22bec39d8736794 (patch)
tree8ff604444e3500c323ee0e21c14b9ca35a623969 /app
parentf294743a2de4d8c237e7c520f2ebb0a7218f6710 (diff)
always load fingerprint.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/agents/files_controller.rb1
-rw-r--r--app/views/agents/files/show.json.jbuilder2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/agents/files_controller.rb b/app/controllers/agents/files_controller.rb
index c25e23e..76051cf 100644
--- a/app/controllers/agents/files_controller.rb
+++ b/app/controllers/agents/files_controller.rb
@@ -9,6 +9,7 @@ module Agents
end
def show
+ @fingerprint = params[:id]
@file = Disposition.find_by(fingerprint: params[:id])
Publisher.publish("queries", {
agent_id: params[:id],
diff --git a/app/views/agents/files/show.json.jbuilder b/app/views/agents/files/show.json.jbuilder
index 8394726..8c6f501 100644
--- a/app/views/agents/files/show.json.jbuilder
+++ b/app/views/agents/files/show.json.jbuilder
@@ -1,6 +1,6 @@
if @file
json.extract! @file, :fingerprint, :state
else
- json.fingerprint params[:fingerprint]
+ json.fingerprint @fingerprint
json.state "unknown"
end