Skip to content

Commit b667efc

Browse files
authored
Merge pull request #119 from codeit-garden/#5.2
fix: 미션 응답 수정
2 parents 56d0b75 + cdae906 commit b667efc

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

src/routers/flowerRouters.js

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,50 @@ router.get('/unlocked', authMiddleware, asyncHandler(getUnlockedFlowers));
5757
* @swagger
5858
* /api/flower/unlocked:
5959
* get:
60-
* summary: "사용자의 잠금 해제된 꽃 목록 조회"
61-
* description: "로그인한 사용자가 잠금 해제한 꽃들의 목록을 반환합니다."
60+
* summary: "사용자의 미션 목록 조회"
61+
* description: "로그인한 사용자가 보유한 미션 목록을 반환합니다."
6262
* tags: [Flowers]
6363
* security:
6464
* - bearerAuth: []
6565
* responses:
6666
* 200:
67-
* description: "성공적으로 잠금 해제된 꽃 목록 조회"
67+
* description: "성공적으로 미션 목록 조회"
6868
* content:
6969
* application/json:
7070
* schema:
7171
* type: array
7272
* items:
7373
* type: object
7474
* properties:
75-
* memberId:
75+
* title:
76+
* type: string
77+
* description: "미션 제목"
78+
* example: "3일 연속 심기"
79+
* description:
80+
* type: string
81+
* description: "미션 설명"
82+
* example: "연속 3일 동안 꽃을 심었어요"
83+
* type:
84+
* type: string
85+
* description: "미션 타입"
86+
* enum: [CONSECUTIVE_PLANTING, TOTAL_FLOWERS, FOCUS_TIME]
87+
* example: "CONSECUTIVE_PLANTING"
88+
* targetValue:
7689
* type: integer
77-
* description: "회원 ID"
78-
* flowerId:
90+
* description: "미션 목표값"
91+
* example: 3
92+
* currentValue:
7993
* type: integer
80-
* description: "꽃 ID"
81-
* unlocked:
94+
* description: "현재 진행 값"
95+
* example: 2
96+
* completed:
8297
* type: boolean
83-
* description: "잠금 해제 여부"
84-
* flower:
85-
* type: object
86-
* description: "꽃 상세 정보"
98+
* description: "미션 달성 여부"
99+
* example: false
100+
* flowerName:
101+
* type: string
102+
* description: "관련 꽃 이름"
103+
* example: "초롱꽃"
87104
* 401:
88105
* description: "인증 실패"
89106
* 500:

src/services/missionService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const uncompletedMission = async (memberId) => {
5252
}
5353
missionList.push(formatMission);
5454
}
55-
return { missionList };
55+
return missionList;
5656
} catch (error) {
5757
console.error(error);
5858
throw new CustomError(ErrorCodes.InternalServerError,"사용자의 미션 목록 조회 중 오류가 발생하였습니다.");

0 commit comments

Comments
 (0)