-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
템플릿 목록 조회, 상세 조회, 생성 요청 로직 리펙토링 #110
템플릿 목록 조회, 상세 조회, 생성 요청 로직 리펙토링 #110
Conversation
api 요구사항에 맞게 응답 json 객체 키 카멜케이스로 변경
…de-zap into refactor/templates_api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
간단한 코멘트 남겼어요. 고생하셨슴다
@@ -0,0 +1,4 @@ | |||
export const QUERY_KEY = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
키를 쓸 때 Symbol 데이터 타입을 고려해봐도 좋겠네요!
frontend/src/api/config.ts
Outdated
export const END_POINT = { | ||
TEMPLATES: '/templates', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
당장은 이렇게 파일을 분리하지 않고, templates.ts 파일을 분리한다면 관련 엔드포인트도 해당 파일에 모아두는 것도 방법일 것 같아요~!
await waitFor(() => { | ||
expect(result.current.isSuccess).toBe(true); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추후에 isSuccess가 true인지 확인 + 실제 데이터가 들어갔는지 확인해도 좋을 것 같아요.
⚡️ 관련 이슈
close #103
📍주요 변경 사항
1. dotenv 설치 및 webpack 설정 추가
2. endPoint 상수화 및 api 요청 함수 별도로 분리(
api/templates
) 및 테스트 작성3. UploadsTemplate => TemplateUpload 로 변경
4. 응답 json 객체 키 카멜케이스로 변경
5. msw browser 설정
🎸기타