[FEATURE] 저장된 URL 중복 체크 API 연동#75
Merged
Merged
Conversation
minsoo0506
reviewed
May 31, 2026
|
넵 확인했습니다!! |
minsoo0506
approved these changes
May 31, 2026
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.
Closes #74
개요
링크 검사 시작 전, 사용자가 입력한 URL이 이미 저장된 링크에 존재하는지 확인하는 API를 연동했습니다.
기존에는 URL 입력 후 검사 시작 버튼을 누르면 바로 검사 중 화면으로 이동하고,
POST /api/v1/analyses분석 요청 및 polling 흐름이 시작되었습니다. 이번 작업에서는 검사 화면으로 이동하기 전에 저장 링크 URL 중복 체크 API를 먼저 호출하도록 변경했습니다.중복 체크 결과
exists: true이면 분석 요청을 시작하지 않고, 검사 중 화면으로 이동하지 않으며, 사용자에게 이미 저장된 링크임을 안내합니다.exists: false이면 기존 링크 검사 흐름이 그대로 진행됩니다.주요 구현 내용
GET /api/v1/saved-links/check?url={url}연동authenticatedApiRequest사용encodeURIComponent로 인코딩 처리이미 저장된 링크입니다.안내 표시파일별 역할
api/saved-links.ts: 저장 링크 URL 중복 체크 응답 타입과checkSavedLinkUrlAPI 호출 함수 추가app/(tabs)/(home)/add-link.tsx: 검사 시작 버튼 클릭 시 URL 검증 후 중복 체크 API를 먼저 호출하고, 결과에 따라 검사 진행 여부 분기 처리해결한 이슈 목록
app/(tabs)/(home)/add-link.tsx에서 검사 버튼 클릭 흐름 확인api/saved-links.ts에 추가GET /api/v1/saved-links/check?url={url}요청에 Clerk 인증 토큰 포함authenticatedApiRequest사용exists: true응답이면 분석 요청을 시작하지 않고 사용자에게 이미 저장된 링크임을 안내exists: false응답이면 기존 링크 검사 흐름 유지POST /api/v1/analyses요청 및 polling 흐름 유지체크 사항
/auth/me를 수동 호출하지 않음참고사항
LinClean-BE-springPR #43에서dev브랜치에 머지된 내용을 사용했습니다.GET /api/v1/saved-links/check?url={url}{ data: { exists: boolean } }형태이며, 프론트 공통 API 클라이언트가data를 unwrap합니다.Analysis.original_urlexact match입니다.Screenshots or Video