summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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