Skip to content

Commit

Permalink
#1410 Add objectId and objectType to action audits
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 17, 2020
1 parent 0f77359 commit ae32a19
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,15 @@ class ActionSrv @Inject() (
} yield {
relatedCase(updated._id)
.orElse(get(updated._id).context.headOption()) // FIXME an action context is it an audit context ?
.foreach(relatedEntity => auditSrv.action.update(updated, relatedEntity, Json.obj("status" -> updated.status.toString)))
.foreach(relatedEntity =>
auditSrv
.action
.update(
updated,
relatedEntity,
Json.obj("status" -> updated.status.toString, "objectId" -> relatedEntity._id, "objectType" -> relatedEntity._model.label)
)
)

updated
}
Expand Down

0 comments on commit ae32a19

Please sign in to comment.