Skip to content

Commit

Permalink
fix: {mapId} 포함 url endpoint 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjookang committed Aug 19, 2024
1 parent 229f200 commit 84ba554
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/com/mapu/domain/map/api/MapController.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,19 @@ public BaseResponse<List<MapListResponseDTO>> getMapList(@AuthenticationPrincipa
/**
* 탐색화면 북마크 추가
*/
@PostMapping("/bookmark")
public BaseResponse addMapBookmark(@AuthenticationPrincipal JwtUserDto jwtUserDto, @RequestParam Long mapId) {
@PostMapping("/{mapId}/bookmark")
public BaseResponse addMapBookmark(@AuthenticationPrincipal JwtUserDto jwtUserDto,
@PathVariable("mapId") Long mapId) {
mapService.addMapBookmark(Long.parseLong(jwtUserDto.getName()), mapId);
return new BaseResponse<>();
}

/**
* 탐색화면 북마크 취소
*/
@DeleteMapping("/bookmark")
public BaseResponse removeMapBookmark(@AuthenticationPrincipal JwtUserDto jwtUserDto, @RequestParam Long mapId) {
@DeleteMapping("/{mapId}/bookmark")
public BaseResponse removeMapBookmark(@AuthenticationPrincipal JwtUserDto jwtUserDto,
@PathVariable("mapId") Long mapId) {
mapService.removeMapBookmark(Long.parseLong(jwtUserDto.getName()), mapId);
return new BaseResponse<>();
}
Expand Down Expand Up @@ -140,7 +142,7 @@ public BaseResponse<MapBasicInfoResponseDTO> getMapInfo(@PathVariable("mapId") L
* 지도 제목 수정 API (지도 편집 화면 좌측 사이드 패널)
*/
@Transactional
@PatchMapping("/info/{mapId}/title")
@PatchMapping("/{mapId}/info/title")
public BaseResponse updateMapTitle(@AuthenticationPrincipal JwtUserDto jwtUserDto,
@PathVariable("mapId") long mapId,
@RequestBody UpdateMapRequest updateMapRequest){
Expand All @@ -152,7 +154,7 @@ public BaseResponse updateMapTitle(@AuthenticationPrincipal JwtUserDto jwtUserDt
* 지도 설명 수정 API (지도 편집 화면 좌측 사이드 패널)
*/
@Transactional
@PatchMapping("/info/{mapId}/description")
@PatchMapping("/{mapId}/info/description")
public BaseResponse updateMapDescription(@AuthenticationPrincipal JwtUserDto jwtUserDto,
@PathVariable("mapId") long mapId,
@RequestBody UpdateMapRequest updateMapRequest){
Expand Down

0 comments on commit 84ba554

Please sign in to comment.