Skip to content

Commit

Permalink
chore (#3) : 인증후 결과조회할때 회원id 리턴, 링크공유시 id로 조회하기위함
Browse files Browse the repository at this point in the history
  • Loading branch information
daehwan2yo committed Apr 11, 2022
1 parent 3790891 commit d137bdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ private int extractStudyDegree(CreateCalendarRequest.ExamInfo dto) {

@GetMapping(value = "/my/calendar/result", produces = APPLICATION_JSON_VALUE)
public ResponseEntity<CalendarResponse> getMyCalenderResponse(@LoginAccount Account account) {
if(account.isAnonymous()) {
if (account.isAnonymous()) {
throw new IllegalStateException("need authentication to retrieve self result");
}
Calendar calendar = calendarService.find(account);

return ResponseEntity.ok(CalendarResponse.builder()
.nickname(account.getNickname())
.accountId(account.getId())
.tendency(account.getTendency())
.exams(convertExamInfos(calendar))
.calendar(convertMonthToDoInfo(calendar))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class CalendarResponse {

private int tendency;

private Long accountId;

private List<ExamInfo> exams;

private List<MonthToDoInfo> calendar;
Expand Down

0 comments on commit d137bdf

Please sign in to comment.