Skip to content

Commit

Permalink
fix: api 잘못 매치된 속성 수정 (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-noo authored Oct 12, 2022
1 parent 51752f2 commit 0e980b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/api/link/typeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ export const checkLink = (data: unknown): Link => {
linkUrl: checkType(data.linkUrl, isString),
description: checkType(data.description, isString),
createdDate: checkType(data.createdDate, isDateYMD),
lastModifiedDate: checkType(data.createdDate, isDateYMD),
lastModifiedDate: checkType(data.lastModifiedDate, isDateYMD),
};
};
4 changes: 2 additions & 2 deletions frontend/src/api/studies/typeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const checkStudy = (data: unknown): Study => {
return {
id: checkType(data.id, isNumber),
title: checkType(data.title, isString),
excerpt: checkType(data.title, isString),
thumbnail: checkType(data.title, isString),
excerpt: checkType(data.excerpt, isString),
thumbnail: checkType(data.thumbnail, isString),
tags: checkType(data.tags, isArray).map(tag => checkMainStudyTag(tag)),
recruitmentStatus: checkType(data.recruitmentStatus, isRecruitmentStatus),
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/study/typeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const checkStudy = (data: unknown): ApiStudy['get']['responseData'] => {
thumbnail: checkType(data.thumbnail, isString),
recruitmentStatus: checkType(data.recruitmentStatus, isRecruitmentStatus),
description: checkType(data.description, isString),
currentMemberCount: checkType(data.id, isNumber),
currentMemberCount: checkType(data.currentMemberCount, isNumber),
maxMemberCount: checkType(data.maxMemberCount, isNumber, true),
createdDate: checkType(data.createdDate, isDateYMD),
enrollmentEndDate: checkType(data.enrollmentEndDate, isDateYMD, true),
Expand Down

0 comments on commit 0e980b9

Please sign in to comment.