From 01ed14575dd5fe95f0b8f1e21d95b1eee343be52 Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 17 Nov 2020 09:12:50 +0100 Subject: [PATCH] #1652 Return the log on update --- thehive/app/org/thp/thehive/controllers/v0/LogCtrl.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/controllers/v0/LogCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/LogCtrl.scala index 583a43105f..4285118d2d 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/LogCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/LogCtrl.scala @@ -55,7 +55,13 @@ class LogCtrl @Inject() ( .can(Permissions.manageTask), propertyUpdaters ) - .map(_ => Results.NoContent) + .flatMap { + case (logs, _) => + logs + .richLog + .getOrFail("Log") + .map(richLog => Results.Ok(richLog.toJson)) + } } def delete(logId: String): Action[AnyContent] =