[Refactor/#67] 코드 중복 삭제 및 인증 미들웨어 추가 #79
Merged
jeongkyueun merged 4 commits intodevelopfrom Jan 19, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📌Refactor: 코드 중복 삭제 및 인증 미들웨어 추가
📌 관련 이슈번호
📌 PR 유형
어떤 변경 사항이 있나요?
📌 PR 요약
task.service.js와 task.route.js 파일 개선
인증 미들웨어 추가, 중복 코드 제거, 에러 핸들링 개선 등이 포함.
📌 작업 세부 내용
인증 미들웨어 추가
task.route.js의 모든 라우트에 authenticate 미들웨어 적용
보안 강화를 위해 인증이 필요한 모든 엔드포인트 보호
중복 코드 제거
task.service.js에서 중복된 updateSubTaskStatus 메서드 제거
코드 가독성 및 유지보수성 향상
에러 핸들링 개선
status → statusCode로 통일
errorCode 필드 추가로 상세한 에러 식별 가능
404 에러에 대한 구체적인 에러 코드(SUBTASK_NOT_FOUND) 추가
API 엔드포인트
세부 TASK 상태 업데이트(/subtask/:subTaskId/status)
세부 TASK 마감일 변경(/subtask/:subTaskId/deadline)
세부 TASK 담당자 설정(/subtask/:subTaskId/assignee)
기능 개선
세부 TASK 담당자 설정 시 팀/개인 과제에 따른 유효성 검사 강화
에러 발생 시 상세한 로깅 추가
📸 스크린샷 (선택)
🔗 참고 자료