Rename report.took to stats.parseTime

This commit is contained in:
Sandra
2022-01-31 03:16:13 +01:00
parent bb2f786965
commit 900b807b74
2 changed files with 4 additions and 4 deletions

View File

@@ -84,15 +84,15 @@ public class ParseController {
throw new RuntimeException("Invalid report"); throw new RuntimeException("Invalid report");
} }
Map<String, Object> report = Map.of( Map<String, Object> stats = Map.of(
"took", (Duration.between(start, Instant.now())) "parseTime", (Duration.between(start, Instant.now()))
); );
return ResponseEntity.ok(Map.of( return ResponseEntity.ok(Map.of(
"meta", metadata, "meta", metadata,
"header", header, "header", header,
"data", records, "data", records,
"report", report "stats", stats
)); ));
} }
} }

View File

@@ -96,7 +96,7 @@ export default {
this.report = await this.axios.post('/v1/parse', formData, {headers: {'Content-Type': 'multipart/form-data'}}) this.report = await this.axios.post('/v1/parse', formData, {headers: {'Content-Type': 'multipart/form-data'}})
.then((response) => response.data) .then((response) => response.data)
.catch((error) => console.log(error)); .catch((error) => console.log(error));
console.log(`Report parsing took ${this.report.took}`); console.log(`Report parsing took ${this.report.stats.parseTime}`);
} }
}, },
setup: function () { setup: function () {