Skip to content

Commit

Permalink
#1371 Add attachment properties
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jun 15, 2020
1 parent 321b109 commit a4e1ede
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion thehive/app/org/thp/thehive/controllers/v0/Properties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ class Properties @Inject() (
.property("tlp", UniMapping.int)(_.field.updatable)
.property("dataType", UniMapping.string)(_.select(_.observableType.name).readonly)
.property("data", UniMapping.string.optional)(_.select(_.data.data).readonly)
// TODO add attachment ?
.property("attachment.name", UniMapping.string.optional)(_.select(_.attachments.name).readonly)
.property("attachment.size", UniMapping.long.optional)(_.select(_.attachments.size).readonly)
.property("attachment.contentType", UniMapping.string.optional)(_.select(_.attachments.contentType).readonly)
.property("attachment.hashes", UniMapping.string)(_.select(_.attachments.hashes.map(_.toString)).readonly)
.build

lazy val organisation: List[PublicProperty[_, _]] =
Expand Down

0 comments on commit a4e1ede

Please sign in to comment.