Skip to content
Merged

Woo #401

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
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

## 📊 프로젝트 현황 요약

> 마지막 분석: 2026-01-26 | **전체 완료율: 97%**
> 마지막 분석: 2026-01-31 | **전체 완료율: 97%**

| 항목 | 현황 | 상세 |
|------|:----:|------|
Expand Down Expand Up @@ -907,16 +907,16 @@ SUPABASE_SERVICE_KEY=서비스_키 # (선택사항)

| 항목 | 상태 |
|------|------|
| **버전** | 1.7.0 |
| **마지막 업데이트** | 2026-01-26 |
| **버전** | 1.7.1 |
| **마지막 업데이트** | 2026-01-31 |
| **유지보수** | 활발히 진행 중 |
| **문서화** | 완료 |
| **테스트 커버리지** | 진행 중 |
| **Swagger 문서** | [API Docs](https://teamitakabackend.onrender.com/api-docs) |

## 📊 개발 현황 (Development Status)

> 마지막 분석: 2026-01-26 | 전체 완료율: **97%**
> 마지막 분석: 2026-01-31 | 전체 완료율: **97%**

### 🎯 전체 개발 진행률

Expand Down Expand Up @@ -994,6 +994,18 @@ SUPABASE_SERVICE_KEY=서비스_키 # (선택사항)

## 🔄 변경 이력

### v1.7.1 (2026-01-31)
- 📏 **프로젝트 제목 15자 제한 추가**
- `POST /api/projects` - 프로젝트 생성 시 제목 15자 제한
- `PUT /api/projects/:id` - 프로젝트 수정 시 제목 15자 제한
- `POST /api/projects/from-recruitment/:id` - 킥오프 시 제목 15자 제한
- ⭐ **평가 API 담당 업무 필드 추가**
- `GET /api/evaluations/given` 응답에 `target_member_task` 필드 추가
- 평가 대상자의 프로젝트 내 담당 업무 표시 지원
- 📝 **Swagger 문서 업데이트**
- 프로젝트 제목 15자 제한 명시
- 평가 API 응답 스키마 상세화

### v1.7.0 (2026-01-26)
- 📱 **SMS 인증 시스템 구현**
- Solapi 통합으로 SMS 발송
Expand Down
15 changes: 15 additions & 0 deletions src/controllers/projectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const createProject = async (req, res) => {
// JWT에서 user_id 가져오기 (authMiddleware가 설정)
const user_id = req.user.userId;

// 프로젝트 제목 15자 제한
if (req.body.title && req.body.title.length > 15) {
return res.status(400).json({ error: "프로젝트 제목은 15자 이내여야 합니다." });
}

// 프로젝트 생성 (recruitment_id 불필요)
const newProject = await Project.create({
...req.body,
Expand Down Expand Up @@ -87,6 +92,11 @@ const updateProject = async (project_id, updateData) => {
const project = await Project.findByPk(project_id);
if (!project) throw new Error("프로젝트를 찾을 수 없습니다.");

// 프로젝트 제목 15자 제한
if (updateData.title && updateData.title.length > 15) {
throw new Error("프로젝트 제목은 15자 이내여야 합니다.");
}

// status가 "COMPLETED"일 경우, end_date가 없으면 현재 날짜로 설정
if (updateData.status === "COMPLETED" && !project.end_date) {
updateData.end_date = new Date();
Expand Down Expand Up @@ -319,6 +329,11 @@ const createProjectFromRecruitment = async (req, res) => {
return res.status(400).json({ error: "프로젝트 제목은 필수입니다." });
}

if (title.length > 15) {
await transaction.rollback();
return res.status(400).json({ error: "프로젝트 제목은 15자 이내여야 합니다." });
}

if (!memberUserIds || !Array.isArray(memberUserIds) || memberUserIds.length === 0) {
await transaction.rollback();
return res.status(400).json({ error: "프로젝트 멤버를 선택해주세요." });
Expand Down
82 changes: 77 additions & 5 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2633,6 +2633,9 @@ paths:
post:
tags: [Project]
summary: 프로젝트 생성
description: |
새 프로젝트를 생성합니다.
- 프로젝트 제목은 **15자 이내**로 제한됩니다.
security:
- bearerAuth: []
requestBody:
Expand All @@ -2641,10 +2644,12 @@ paths:
application/json:
schema:
type: object
required: [introduction]
required: [title]
properties:
introduction:
title:
type: string
maxLength: 15
description: 프로젝트 제목 (최대 15자)
description:
type: string
start_date:
Expand Down Expand Up @@ -2875,7 +2880,10 @@ paths:
post:
tags: [Project]
summary: 모집글에서 프로젝트 생성 (킥오프)
description: 모집글을 프로젝트로 전환합니다. 프로젝트 제목, 다짐, 진행기간, 선택된 멤버를 입력받습니다.
description: |
모집글을 프로젝트로 전환합니다.
프로젝트 제목, 다짐, 진행기간, 선택된 멤버를 입력받습니다.
- 프로젝트 제목은 **15자 이내**로 제한됩니다.
security:
- bearerAuth: []
parameters:
Expand All @@ -2897,8 +2905,9 @@ paths:
properties:
title:
type: string
description: 프로젝트 제목 (모집글 제목과 별도)
example: "팀이타카 MVP 개발"
maxLength: 15
description: 프로젝트 제목 (최대 15자)
example: "팀이타카 MVP"
resolution:
type: string
description: 다짐 내용
Expand Down Expand Up @@ -6792,8 +6801,71 @@ paths:
type: array
items:
type: object
properties:
review_id:
type: string
format: uuid
target_member_id:
type: string
format: uuid
target_member_name:
type: string
description: 평가 대상자 이름
target_member_task:
type: string
nullable: true
description: 평가 대상자의 담당 업무
participation:
type: integer
minimum: 1
maximum: 5
communication:
type: integer
minimum: 1
maximum: 5
responsibility:
type: integer
minimum: 1
maximum: 5
cooperation:
type: integer
minimum: 1
maximum: 5
ability:
type: integer
minimum: 1
maximum: 5
overall:
type: integer
minimum: 1
maximum: 5
comment:
type: string
evaluated_at:
type: string
format: date-time
total:
type: integer
examples:
success:
summary: 평가 조회 성공
value:
success: true
data:
given_evaluations:
- review_id: "550e8400-e29b-41d4-a716-446655440000"
target_member_id: "550e8400-e29b-41d4-a716-446655440001"
target_member_name: "홍길동"
target_member_task: "백엔드 개발"
participation: 5
communication: 4
responsibility: 5
cooperation: 4
ability: 5
overall: 5
comment: "열심히 참여했습니다"
evaluated_at: "2024-01-15T10:30:00Z"
total: 1
'400':
description: projectId 파라미터 누락
'401':
Expand Down