Skip to content

Commit

Permalink
Revert "Update TransportGetFindingsSearchAction.kt"
Browse files Browse the repository at this point in the history
This reverts commit 2c21988.
  • Loading branch information
Annie Lee committed Mar 15, 2022
1 parent 98eeb72 commit c7d33c1
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class TransportGetFindingsSearchAction @Inject constructor(
searchRequest,
object : ActionListener<SearchResponse> {
override fun onResponse(response: SearchResponse) {
/* val totalFindingCount = response.hits.totalHits?.value?.toInt()
val totalFindingCount = response.hits.totalHits?.value?.toInt()
val findings = mutableListOf<Finding>()
for (hit in response.hits) {
// Debug use
Expand All @@ -153,9 +153,7 @@ class TransportGetFindingsSearchAction @Inject constructor(
XContentParserUtils.ensureExpectedToken(XContentParser.Token.START_OBJECT, xcp.nextToken(), xcp)
findings.add(Finding.parse(xcp, id))
}
*/
// actionListener.onResponse(GetFindingsSearchResponse(RestStatus.OK, totalFindingCount, findings))
actionListener.onResponse(response)
actionListener.onResponse(GetFindingsSearchResponse(RestStatus.OK, totalFindingCount, findings))
}

override fun onFailure(t: Exception) {
Expand Down

0 comments on commit c7d33c1

Please sign in to comment.