week 3#49
Open
crayonpeenut wants to merge 1 commit intocodeit-sprint-fullstack:basic-박도담from
Hidden character warning
The head ref may contain hidden characters: "basic-\ubc15\ub3c4\ub2f4-sprint3"
Open
Conversation
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.
이번 프로젝트는 저번 Panda Market 서비스에 이어
API를 적용해보는 내용입니다.
- Article API → fetch + then/catch
- Product API → async/await + try/catch
https://panda-market-api-crud.vercel.app/docs/#/Article https://panda-market-api-crud.vercel.app/docs/#/Product<구현 기능 체크리스트>
-Article API
[ ] getArticleList() : GET 메서드를 사용해 주세요.
[ ] page, pageSize, keyword 쿼리 파라미터를 이용해 주세요.
[ ] getArticle() : GET 메서드를 사용해 주세요.
[ ] createArticle() : POST 메서드를 사용해 주세요.
[ ] request body에 title, content, image 를 포함해 주세요.
[ ] patchArticle() : PATCH 메서드를 사용해 주세요.
[ ] deleteArticle() : DELETE 메서드를 사용해 주세요.
[ ] fetch 혹은 axios 를 이용해 주세요.
[ ] 응답의 상태 코드가 2XX가 아닐 경우, 에러메시지를 콘솔에 출력해 주세요.
[ ] .then() 메서드를 이용하여 비동기 처리를 해주세요.
[ ] .catch() 를 이용하여 오류 처리를 해주세요.
-Product API
[ ] getProductList() : GET 메서드를 사용해 주세요.
[ ] page, pageSize, keyword 쿼리 파라미터를 이용해 주세요.
[ ] getProduct() : GET 메서드를 사용해 주세요.
[ ] createProduct() : POST 메서드를 사용해 주세요.
[ ] request body에 name, description, price, tags, images 를 포함해 주세요.
[ ] patchProduct() : PATCH 메서드를 사용해 주세요.
[ ] deleteProduct() : DELETE 메서드를 사용해 주세요.
[ ] async/await 을 이용하여 비동기 처리를 해주세요.
[ ] try/catch 를 이용하여 오류 처리를 해주세요.
[ ] 구현한 함수들을 아래와 같이 파일을 분리해 주세요.
[ ] export를 활용해 주세요.
[ ] ProductService.js 파일 Product API 관련 함수들을 작성해 주세요.
[ ] ArticleService.js 파일에 Article API 관련 함수들을 작성해 주세요.
[ ] import를 활용해 주세요.
[ ] 각 함수를 실행하는 코드를 작성하고, 제대로 동작하는지 확인해 주세요.
<실행 및 테스트>
프로젝트 실행 후 브라우저 콘솔을 확인합니다.
main.js에서 각 API 함수가 호출되며 정상적인 응답이 출력되는지 확인합니다.
에러 발생 시 콘솔에 에러 메시지가 출력됩니다.
404 에러 메시지는 다음 단계에서 처리할 예정입니다.