Unverified Commit b2406864 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

use uri as id for reports

parent f6c41952
......@@ -66,7 +66,8 @@ object App extends scala.App with Logging with RecordUtils {
val headers = record.headers()
val recordSetId = Try(headers.lastHeader("recordSetId").value()).getOrElse(Array())
val institutionId = Try(headers.lastHeader("institutionId").value()).getOrElse(Array())
val reportingObject = recordProcessor.process(record).foldLeft(ReportingObject(record.key()))((reportingObject, outcome) => outcome match {
val reportingObject = recordProcessor.process(record).foldLeft(
ReportingObject(s"https://memobase.ch/record/${record.key()}"))((reportingObject, outcome) => outcome match {
case ProcessSuccess(id, resource, msg) =>
logger.info(s"$id: $msg")
ReportingObject.addResourceOutcome(reportingObject, (resource, msg), ProcessingSuccess)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment