Skip to content

Commit

Permalink
PI-2443: Removed unnecessary baseUrl as request is not available to r… (
Browse files Browse the repository at this point in the history
#4176)

PI-2443: Removed unnecessary baseUrl as request is not available to retrieve it
  • Loading branch information
pmcphee77 authored Aug 16, 2024
1 parent 67bcf48 commit 3036ab1
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,17 +452,15 @@ class CommunityApiController(
telemetryService.comparisonFailureEvent(
params["crn"].toString(),
compare,
report,
request.requestURL.toString().replace(request.requestURI, "")
report
)
}, taskExecutor)
}

fun TelemetryService.comparisonFailureEvent(
crn: String,
compare: Compare,
compareReport: CompareReport,
baseUrl: String
compareReport: CompareReport
) {
if (!compareReport.success) {
val comparePayload = mapper.writeValueAsString(compare)
Expand All @@ -471,9 +469,9 @@ class CommunityApiController(
mapOf(
"crn" to crn,
"endpointName" to compareReport.endPointName,
"url" to "$baseUrl/${compareReport.url!!}",
"url" to compareReport.url!!,
"numberOfDifferences" to compareReport.issues?.size.toString(),
"compareUrl" to "${baseUrl}secure/compare",
"compareUrl" to "/secure/compare",
"comparePayload" to comparePayload
)
)
Expand Down

0 comments on commit 3036ab1

Please sign in to comment.