-
Notifications
You must be signed in to change notification settings - Fork 155
[2단계 - 상세 정보 & UI/UX 개선하기] 유월 미션 제출합니다. #308
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
Open
vlmbuyd
wants to merge
12
commits into
woowacourse:vlmbuyd
Choose a base branch
from
vlmbuyd:step2
base: vlmbuyd
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b7a7592
feat(style): 모달 ui 구현
vlmbuyd 891e7a8
refactor(api): api 호출 로직 별도 디렉토리에서 관리
vlmbuyd f320d99
feat(style): 모달 렌더링 로직 구현
vlmbuyd ef18342
feat(style): 반응형 ui 구현
vlmbuyd 71e10e4
feat(style): 히어로 배너 height 사이즈 조정
vlmbuyd c8a52dd
refactor(api): api 로직 함수로 호출
vlmbuyd 39f46c7
feat(error): 영화 상세 api 로직 예외 처리
vlmbuyd fbc978c
feat(movie-detail): 영화 상세 카드 클릭 핸들러 추가
vlmbuyd e3b1d4f
feat(style): 모달 포스터 이미지 비율 수정
vlmbuyd d7977f0
feat(scroll): 무한 스크롤 구현
vlmbuyd f5a5264
chore(directory): 관심사에 맞게 api 관련 파일 이동
vlmbuyd a63c874
feat(rating): 내 별점 기능 구현
vlmbuyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { apiRequest } from "../utils/api"; | ||
| import { MovieResponse, MovieDetail } from "./api"; | ||
|
|
||
| export const fetchPopularMovies = (page: number): Promise<MovieResponse> => | ||
| apiRequest<MovieResponse>({ | ||
| url: `/movie/popular?language=ko-KR&page=${page}`, | ||
| }); | ||
|
|
||
| export const fetchSearchMovies = ( | ||
| query: string, | ||
| page: number, | ||
| ): Promise<MovieResponse> => | ||
| apiRequest<MovieResponse>({ | ||
| url: `/search/movie?language=ko-KR&query=${encodeURIComponent(query)}&page=${page}`, | ||
| }); | ||
|
|
||
| export const fetchMovieDetail = (id: number): Promise<MovieDetail> => | ||
| apiRequest<MovieDetail>({ | ||
| url: `/movie/${id}?language=ko-KR`, | ||
| }); | ||
Oops, something went wrong.
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.
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.
❓ Verification inconclusive
Script executed:
Repository: woowacourse/javascript-movie-review
Repository: woowacourse/javascript-movie-review
Exit code: 0
stdout:
HTTP 오류 응답이 성공으로 전파될 위험이 있습니다.
apiRequest구현을 보니res.ok검증이 없어서, 4xx/5xx 상태 코드도 응답의 JSON 파싱에 성공하면 그대로 반환됩니다. 이렇게 되면 호출부에서 예상한MovieResponse나MovieDetail타입 구조와 일치하지 않는 에러 응답을 받게 되어 런타임 오류를 유발할 수 있어요.현재
fetchPopularMovies,fetchSearchMovies,fetchMovieDetail을 호출하는 대부분의 곳에서 try/catch로 감싸지 않고 있다는 점도 고려해보세요. 다음을 점검해보시길 권합니다:apiRequest에서 HTTP 상태 코드를 어떻게 검증할지🤖 Prompt for AI Agents