Skip to content

Commit

Permalink
Merge pull request #144 from dnd-side-project/fix/#143-schedule
Browse files Browse the repository at this point in the history
[Fix] 일정 - URI 수정
  • Loading branch information
f1v3-dev authored Oct 18, 2024
2 parents b62dec8 + bce73b4 commit 9655e96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public ResponseEntity<ScheduleResponseDto> getMemberSchedule(@PathVariable("meet
* @param scheduleUuid 일정 UUID (비회원)
* @return 200 (OK), body: 일정 응답 DTO
*/
@GetMapping("/guests")
@GetMapping("/guests/{scheduleUuid}")
public ResponseEntity<ScheduleResponseDto> getGuestSchedule(@PathVariable("meetingUuid") String meetingUuid,
@RequestParam("scheduleUuid") String scheduleUuid) {
@PathVariable("scheduleUuid") String scheduleUuid) {

ScheduleResponseDto responseDto = scheduleService.getGuestSchedule(meetingUuid, scheduleUuid);
return ResponseEntity.ok(responseDto);
Expand All @@ -92,9 +92,10 @@ public ResponseEntity<ScheduleResponseDto> getGuestSchedule(@PathVariable("meeti
* @param memberId 요청 회원 ID
* @return 회원의 일정 작성 여부
*/
@GetMapping("/check")
@GetMapping("/members/check")
public ResponseEntity<Boolean> getMemberScheduleWrite(@PathVariable("meetingUuid") String meetingUuid,
@AuthenticationPrincipal Long memberId) {

return ResponseEntity.ok(scheduleService.getMemberScheduleWrite(meetingUuid, memberId));
}

Expand All @@ -105,7 +106,7 @@ public ResponseEntity<Boolean> getMemberScheduleWrite(@PathVariable("meetingUuid
* @param requestDto 일정 수정 요청 DTO
* @return 200 (OK)
*/
@PatchMapping("/{scheduleUuid}")
@PatchMapping("/guests/{scheduleUuid}")
public ResponseEntity<Void> updateGuestSchedule(@PathVariable("meetingUuid") String meetingUuid,
@PathVariable("scheduleUuid") String scheduleUuid,
@Valid @RequestBody ScheduleUpdateRequestDto requestDto) {
Expand All @@ -122,7 +123,7 @@ public ResponseEntity<Void> updateGuestSchedule(@PathVariable("meetingUuid") Str
* @param requestDto 일정 수정 요청 DTO
* @return 200 (OK)
*/
@PatchMapping
@PatchMapping("/members")
public ResponseEntity<Void> updateMemberSchedule(@AuthenticationPrincipal Long memberId,
@PathVariable("meetingUuid") String meetingUuid,
@Valid @RequestBody ScheduleUpdateRequestDto requestDto) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ public class SecurityEndpointPaths {
"/api/v1/meetings/*/times/**",
"/api/v1/meetings/*/participants",
"/api/v1/meetings/*/schedules/guests/**",
"/api/v1/meetings/*/schedules/*"
};

public static final String[] USER_LIST = {
"/api/v1/categories",
"/api/v1/members/**",
"/api/v1/meetings",
"/api/v1/meetings/*/schedules/members",
"/api/v1/meetings/*/schedules",
"/api/v1/meetings/*/schedules/check"
"/api/v1/meetings/*/schedules/members/**",
};

public static final String[] ADMIN_LIST = {
Expand Down

0 comments on commit 9655e96

Please sign in to comment.