Feat: 게시글 수정 및 삭제 API 구현 (#131) #151
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌 개요
🔨 작업 내용
Controller
PostController#updatePostPUT /api/posts/{postId}PostRequest) + 인증 사용자(CustomUserDetails)200 OK+ 수정된 게시글 정보 반환PostController#deletePostDELETE /api/posts/{postId}200 OK+ 메시지 반환Service
PostService#updatePostPOST_NOT_FOUND)POST_NO_PERMISSION)CATEGORY_NOT_FOUNDPostResponse반환PostService#deletePostPOST_NOT_FOUND)POST_NO_PERMISSION)DTO
PostRequest,PostResponse재활용Test
서비스 테스트
컨트롤러 테스트 (MockMvc)
200 OK404 Not Found,403 Forbidden,400 Bad Request,401 Unauthorized200 OK404 Not Found,403 Forbidden,401 UnauthorizedSwagger 문서 (
PostControllerDocs)게시글 수정 API문서화게시글 삭제 API문서화에러 케이스:
POST_NOT_FOUND,POST_NO_PERMISSION,CATEGORY_NOT_FOUNDCOMMON_400,AUTH_001~004,COMMON_500🔗 관련 이슈
Closes #131
📝 참고 사항
✅ 체크리스트