Skip to content

Commit

Permalink
[#25] fix: /user/children return only event's title
Browse files Browse the repository at this point in the history
  • Loading branch information
raae7742 committed Jun 5, 2022
1 parent ae18646 commit efa32cb
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ public ChildDto(Child child) {
this.cprofileImg = child.getCprofileImg();

for(Event event : child.getEvents()) {
if (event.isRegistered() && event.getDate().isEqual(LocalDate.now()))
this.events.add(event.getTitle());
if (event.isRegistered() && event.getDate().isEqual(LocalDate.now())) {
String title = event.getTitle();

// [이름] 제거
if (title.charAt(0) == '[') {
while(title.charAt(0) != ']' || title.length() <= 1)
title = title.substring(1);
title = title.substring(1);
}
this.events.add(title);
}
}
}
}

0 comments on commit efa32cb

Please sign in to comment.