-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/9 monthly agenda #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 형님
LocalDateTime start = YearMonth.of(readMonthlyAgendaRequestDto.getYear(), readMonthlyAgendaRequestDto.getMonth()).atDay(1).atStartOfDay(); | ||
LocalDateTime end = YearMonth.of(readMonthlyAgendaRequestDto.getYear(), readMonthlyAgendaRequestDto.getMonth()).atEndOfMonth().atTime(23, 59, 59); | ||
|
||
Optional<MonthlyAgenda> monthlyAgendaOptional = monthlyAgendaRepository.findByMemberIdAndCreatedAtBetween(currentUserId, start, end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 부분을 orElseThrow로 처리해서 if else 문 안쓰고처리하는방법은 어떨까요!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아아 빈배열 반환을 위해 저렇게 하신거군요 ! 이해했습니다
@@ -63,6 +63,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { | |||
.authorizeHttpRequests((authorizeRequests) -> | |||
authorizeRequests | |||
.requestMatchers("/api/v1/members/signup", "/api/v1/members/login/**","/api/v1/members/renew-access-token","/api/v1/members/logout").permitAll() | |||
.requestMatchers("/api/v1/monthlyAgenda/**").permitAll() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저 경로 밑에 있는 경로 전부 오픈시키면 로그인 하지않은 유저들도 해당 API에 데이터에 접근할 수 있을 것 같아요! Member 등급 이상인 권한을 가진 유저들만 API해당 접근할 수있도록 수정해주시면 좋을 것같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 테스트용 설정했는데, 깜빡했습니다.!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추가 코멘트했습니다 rest api 쪽
summary = "이번달 아젠다 삭제", | ||
description = "이번달 아젠다를 삭제하는 API, 현재는 필요하지 않음." | ||
) | ||
@DeleteMapping("/delete") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restful 규칙: 행위를 포함하지 않는다.
이거 혹시 / 나 행위가 포함되지않도록 하는건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다! 수정하도록 할게요!
summary = "이번달 아젠다 수정", | ||
description = "사용자가 설정한 이번달 아젠다를 수정하는 API" | ||
) | ||
@PutMapping("/update") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restful 규칙: 행위를 포함하지 않는다.
이거 혹시 / 나 행위가 포함되지않도록 하는건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵!
summary = "이번달 아젠다 등록", | ||
description = "사용자가 입력한 이번달 아젠다를 저장하는 API" | ||
) | ||
@PostMapping("/create") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restful 규칙: 행위를 포함하지 않는다.
이거 혹시 / 나 행위가 포함되지않도록 하는건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요기까지 다 확인했습니다 ㅎㅎ
✨ 요약
😎 해결한 이슈