55import com .somemore .domains .community .usecase .board .CreateCommunityBoardUseCase ;
66import com .somemore .domains .community .usecase .board .DeleteCommunityBoardUseCase ;
77import com .somemore .domains .community .usecase .board .UpdateCommunityBoardUseCase ;
8- import com .somemore .global .auth .annotation .CurrentUser ;
8+ import com .somemore .global .auth .annotation .RoleId ;
99import com .somemore .global .common .response .ApiResponse ;
1010import com .somemore .global .imageupload .dto .ImageUploadRequestDto ;
1111import com .somemore .global .imageupload .usecase .ImageUploadUseCase ;
@@ -42,15 +42,15 @@ public class CommunityBoardCommandApiController {
4242 @ Operation (summary = "커뮤니티 게시글 등록" , description = "커뮤니티 게시글을 등록합니다." )
4343 @ PostMapping (consumes = MULTIPART_FORM_DATA_VALUE )
4444 public ApiResponse <Long > createCommunityBoard (
45- @ CurrentUser UUID userId ,
45+ @ RoleId UUID volunteerId ,
4646 @ Valid @ RequestPart ("data" ) CommunityBoardCreateRequestDto requestDto ,
4747 @ RequestPart (value = "img_file" , required = false ) MultipartFile image
4848 ) {
4949 String imgUrl = imageUploadUseCase .uploadImage (new ImageUploadRequestDto (image ));
5050
5151 return ApiResponse .ok (
5252 201 ,
53- createCommunityBoardUseCase .createCommunityBoard (requestDto , userId , imgUrl ),
53+ createCommunityBoardUseCase .createCommunityBoard (requestDto , volunteerId , imgUrl ),
5454 "커뮤니티 게시글 등록 성공"
5555 );
5656 }
@@ -59,13 +59,13 @@ public ApiResponse<Long> createCommunityBoard(
5959 @ Operation (summary = "커뮤니티 게시글 수정" , description = "커뮤니티 게시글을 수정합니다." )
6060 @ PutMapping (value = "/{id}" , consumes = MULTIPART_FORM_DATA_VALUE )
6161 public ApiResponse <String > updateCommunityBoard (
62- @ CurrentUser UUID userId ,
62+ @ RoleId UUID volunteerId ,
6363 @ PathVariable Long id ,
6464 @ Valid @ RequestPart ("data" ) CommunityBoardUpdateRequestDto requestDto ,
6565 @ RequestPart (value = "img_file" , required = false ) MultipartFile image
6666 ) {
6767 String imgUrl = imageUploadUseCase .uploadImage (new ImageUploadRequestDto (image ));
68- updateCommunityBoardUseCase .updateCommunityBoard (requestDto , id , userId , imgUrl );
68+ updateCommunityBoardUseCase .updateCommunityBoard (requestDto , id , volunteerId , imgUrl );
6969
7070 return ApiResponse .ok ("커뮤니티 게시글 수정 성공" );
7171 }
@@ -74,10 +74,10 @@ public ApiResponse<String> updateCommunityBoard(
7474 @ Operation (summary = "커뮤니티 게시글 삭제" , description = "커뮤니티 게시글을 삭제합니다." )
7575 @ DeleteMapping (value = "/{id}" )
7676 public ApiResponse <String > deleteCommunityBoard (
77- @ CurrentUser UUID userId ,
77+ @ RoleId UUID volunteerId ,
7878 @ PathVariable Long id
7979 ) {
80- deleteCommunityBoardUseCase .deleteCommunityBoard (userId , id );
80+ deleteCommunityBoardUseCase .deleteCommunityBoard (volunteerId , id );
8181
8282 return ApiResponse .ok ("커뮤니티 게시글 삭제 성공" );
8383 }
0 commit comments