Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

## 링크

- [🍡 프로젝트 사이트](http://issue-tracker.online)
- [🍡 프로젝트 사이트](https://www.issue-tracker.online)
- [🐈‍⬛ Github 링크](https://github.com/codesquad-masters2025-team05/issue-tracker.git)
- [🫆 Jira 링크](https://jqk1797.atlassian.net/jira/software/projects/CS/summary?atlOrigin=eyJpIjoiZWNkM2RjNjUyMmJlNDcyMjkwYjFhNTAxOGViMDk1NTciLCJwIjoiaiJ9)
- [📖 Notion 링크](https://flowery-unicorn-313.notion.site/CodeSquard-team05-1909003424f180438a2dd668361f3bf4?pvs=4)

## 브랜치 구조
Expand All @@ -34,31 +33,16 @@ main ← 최종 배포 브랜치
- MySQL
- JDBC
- GitHub Actions (CI/CD)
- AWS EC2, RDS
- AWS EC2, RDS, S3
- Ngnix

### 📁 프로젝트 구조
### 📁 시스템 아키텍처

<img src="https://github.com/user-attachments/assets/0c016136-279c-4937-9a52-4d660fd0b93c" width="600" />

```aiignore
src/
└── main/
├── java/
│ └── com.team5.issue_tracker/
│ ├── common/ # 공통 유틸, 예외, 응답 처리 등
│ │
│ ├── issue/ # 이슈 관련 모듈
│ │
│ ├── label/
│ │
│ ├── milestone/ # 마일스톤 관련 모듈
│ │
│ └── user/ # 사용자 관련 모듈
└── resources/
├── application.yml # 설정 파일
└── schema.sql # 데이터 베이스
```

### 🍎 ERD
<img src="https://github.com/user-attachments/assets/eb231848-16ef-49fa-b854-95650fae9e03" width="600" />

---

Expand Down Expand Up @@ -108,4 +92,4 @@ src/
```


---
---
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public Long addComment(Long issueId, CommentRequest request, Long userId) {
public void editComment(Long commentId, CommentRequest updateCommentRequest, Long userId) {
validateUserExists(userId);

if(!commentId.equals(userId)){
throw new NotFoundException(ErrorCode.COMMENT_NOT_FOUND);
}

Comment comment = commentRepository.findById(commentId)
.orElseThrow(() -> new NotFoundException(ErrorCode.COMMENT_NOT_FOUND));

if(!comment.getUserId().equals(userId)){
throw new NotFoundException(ErrorCode.USER_NOT_FOUND);
}

comment.setContent(updateCommentRequest.getContent());
comment.setUpdatedAt(Instant.now());
commentRepository.save(comment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ private void validateUserExists(Long userId) {
private void validateUserOwnsIssue(Long userId, Long issueId) {
validateIssueExists(issueId);
validateUserExists(userId);
Issue issue = issueRepository.findById(issueId).get();

if (issueId.equals(userId)) {
if (!issue.getUserId().equals(userId)) {
throw new NotFoundException(ErrorCode.ISSUE_NOT_FOUND);
}
}
Expand Down