sprint mission3- 최우진#44
Open
DevWoojin97 wants to merge 4 commits intocodeit-sprint-fullstack:basicfrom
Open
Conversation
wseungjin
approved these changes
Dec 29, 2025
| `${BASE_URL}/products?page=${page}&pageSize=${pageSize}&orderBy=${orderBy}&keyword=${keyword}` | ||
| ) | ||
| .then((res) => { | ||
| if (!res.ok) { |
Collaborator
There was a problem hiding this comment.
상태 코드에 대해서 잘 알고 계시나요?
공부해보시면 좋을꺼 같아요.
| return data; | ||
| }) | ||
| .catch((error) => { | ||
| console.log(error); |
Collaborator
There was a problem hiding this comment.
파일로 로깅하거나, 네트워크로 로깅을하거나, 디비로 로깅을 하면 좋을거 같아요. 지금은 말고 나중에 한번 해보시면 좋을거 같아요.
| }); | ||
| } | ||
|
|
||
| function createArticle(articleData) { |
Collaborator
There was a problem hiding this comment.
createArticle 데이터 검증 validation을 하면 좋을거같아요.
| }); | ||
| } | ||
|
|
||
| function updateArticle(id, articleData) { |
Collaborator
There was a problem hiding this comment.
updateArticle 데이터 검증 validation을 하면 좋을거같아요. (2)
|
|
||
| function deleteArticle(id) { | ||
| return fetch(`${BASE_URL}/articles/${id}`, { | ||
| method: 'DELETE', |
Collaborator
There was a problem hiding this comment.
소프트 딜리트에 대해서 고민해보면 좋을거 같습니다.
| name: '상품 이름', | ||
| }; | ||
|
|
||
| const articles = await articleService.createArticle(articleData); |
Collaborator
There was a problem hiding this comment.
test코드 jest, mocha 를 사용해서 실제로 테스트 코드를 짜보고 돌려봐도 좋을거 같아요.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.