Skip to content

Commit

Permalink
Update StoryBookLearningEventCsvExportController.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Aug 26, 2024
1 parent fa2eaa5 commit bef81b5
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ public void handleRequest(
List<StoryBookLearningEvent> storyBookLearningEvents = storyBookLearningEventDao.readAll();
logger.info("storyBookLearningEvents.size(): " + storyBookLearningEvents.size());

CSVFormat csvFormat = CSVFormat.DEFAULT
.withHeader(
"id", // The Room database ID
"timestamp",
"android_id",
"package_name",
"storybook_id",
"storybook_title",
"learning_event_type"
);
CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
.setHeader(
"id", // The Room database ID
"timestamp",
"android_id",
"package_name",
"storybook_id",
"storybook_title",
"learning_event_type"
)
.build();

StringWriter stringWriter = new StringWriter();
CSVPrinter csvPrinter = new CSVPrinter(stringWriter, csvFormat);
Expand Down

0 comments on commit bef81b5

Please sign in to comment.