diff --git a/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala b/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala index 80e54c98c1..3e691b4086 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala @@ -167,7 +167,7 @@ class ShareCtrl @Inject() ( else if (shareSrv.get(shareId).has(_.owner, true).exists) Failure(AuthorizationError("You can't remove initial shares")) else - shareSrv.get(shareId).getOrFail("Share").flatMap(shareSrv.delete(_)) + shareSrv.unshareCase(shareId) def updateShare(shareId: String): Action[AnyContent] = entrypoint("update share")