Skip to content

Commit

Permalink
#271 Update alert status when merged in bulk mode
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jan 30, 2019
1 parent 470f731 commit 0f092ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion thehive-backend/app/services/AlertSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,13 @@ class AlertSrv(
}

def bulkMergeWithCase(alerts: Seq[Alert], caze: Case)(implicit authContext: AuthContext): Future[Case] = {
Future.traverse(alerts)(importArtifacts(_, caze)).map(_ caze)
Future.traverse(alerts) { alert
for {
_ importArtifacts(alert, caze)
_ setCase(alert, caze)
} yield ()
}
.map(_ caze)
}

def importArtifacts(alert: Alert, caze: Case)(implicit authContext: AuthContext): Future[Case] = {
Expand Down

0 comments on commit 0f092ab

Please sign in to comment.