From c65a183b8447fd012d9f08c04d9546d813a9e783 Mon Sep 17 00:00:00 2001 From: To-om Date: Wed, 18 Nov 2020 07:44:27 +0100 Subject: [PATCH] #1649 Fix type return by describe API for hashes --- thehive/app/org/thp/thehive/controllers/v0/DescribeCtrl.scala | 2 +- thehive/app/org/thp/thehive/controllers/v1/DescribeCtrl.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thehive/app/org/thp/thehive/controllers/v0/DescribeCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/DescribeCtrl.scala index 16a8ceaaf5..65599ccb62 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/DescribeCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/DescribeCtrl.scala @@ -215,7 +215,7 @@ class DescribeCtrl @Inject() ( prop.mapping.domainTypeClass match { case c if c == classOf[Boolean] || c == classOf[JBoolean] => Seq(PropertyDescription(prop.propertyName, "boolean")) case c if c == classOf[Date] => Seq(PropertyDescription(prop.propertyName, "date")) - case c if c == classOf[Hash] => Seq(PropertyDescription(prop.propertyName, "hash")) + case c if c == classOf[Hash] => Seq(PropertyDescription(prop.propertyName, "string")) case c if classOf[Number].isAssignableFrom(c) => Seq(PropertyDescription(prop.propertyName, "number")) case c if c == classOf[String] => Seq(PropertyDescription(prop.propertyName, "string")) case _ => diff --git a/thehive/app/org/thp/thehive/controllers/v1/DescribeCtrl.scala b/thehive/app/org/thp/thehive/controllers/v1/DescribeCtrl.scala index ac393112f8..c5a2322a85 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/DescribeCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/DescribeCtrl.scala @@ -207,7 +207,7 @@ class DescribeCtrl @Inject() ( prop.mapping.domainTypeClass match { case c if c == classOf[Boolean] || c == classOf[JBoolean] => Seq(PropertyDescription(prop.propertyName, "boolean")) case c if c == classOf[Date] => Seq(PropertyDescription(prop.propertyName, "date")) - case c if c == classOf[Hash] => Seq(PropertyDescription(prop.propertyName, "hash")) + case c if c == classOf[Hash] => Seq(PropertyDescription(prop.propertyName, "string")) case c if classOf[Number].isAssignableFrom(c) => Seq(PropertyDescription(prop.propertyName, "number")) case c if c == classOf[String] => Seq(PropertyDescription(prop.propertyName, "string")) case _ =>