-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 편지 공유 요청 수신 조회 기능 구현 #90
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3433321
feat: 편지 공유 요청 수신 조회 기능 구현
tifsy c7d5e92
refactor: incomingLetters.ts 코드 리팩토링
tifsy e9737ed
refactor: incomingLettersStore.ts에서 필요 없는 필드 정리
tifsy 4330424
feat: 오고 있는 편지 도착까지 걸리는 시간 카운트다운 기능 구현
tifsy be98d74
design: 오고 있는 편지 모달에서 데이터가 없을 때 대체 텍스트 추가
tifsy 3a139fe
design: 임시저장된 편지 모달에서 데이터가 없을 때 대체 텍스트 추가
tifsy 0c08208
design: 편지 공유 요청 수신 조회 모달에서 데이터가 없을 때 대체 텍스트 추가
tifsy ef9a135
Merge branch 'develop' into 78-get-share-approval
tifsy 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ export interface SharePost { | |
| letters: ShareLetter[]; | ||
| } | ||
|
|
||
| // 페이징 포함 | ||
| // 공유 게시글 목록 조회 - 페이징 포함 | ||
| export interface SharePostResponse { | ||
| content: SharePost[]; | ||
| currentPage: number; | ||
|
|
@@ -30,6 +30,15 @@ export interface SharePostResponse { | |
| totalPages: number; | ||
| } | ||
|
|
||
| // 편지 공유 요청 수신 조회 | ||
| export interface ShareProposal { | ||
| shareProposalId: number; | ||
| requesterZipCode: string; | ||
| recipientZipCode: string; | ||
| message: string; | ||
| status: 'REJECTED' | 'APPROVED' | 'PENDING'; | ||
| } | ||
|
|
||
| // 편지 공유 수락 / 거절 | ||
| export interface SharePostApproval { | ||
| shareProposalId: number; | ||
|
|
@@ -84,6 +93,19 @@ export const postShareProposals = async ( | |
| } | ||
| }; | ||
|
|
||
| // 편지 공유 요청 수신 조회 | ||
| export const getShareProposalList = async () => { | ||
| try { | ||
| const response = await client.get('/api/share-proposals/inbox'); | ||
| console.log(`🌟공유 요청 목록`, response.data); | ||
|
|
||
| return response.data.data; | ||
| } catch (error) { | ||
| console.error('❌ 편지 공유 요청을 조회하던 중 에러가 발생했습니다', error); | ||
| throw error; | ||
|
Comment on lines
+104
to
+105
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 에러코드 가져오시는거군용
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 정확합니다~ |
||
| } | ||
| }; | ||
|
|
||
| // 편지 공유 수락 / 거절 | ||
| export const postShareProposalApproval = async ( | ||
| shareProposalId: number, | ||
|
|
||
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
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
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.
나중에 이렇게 만들어진 인터페이스들 따로 파일로 빼두면 좋을 것 같아요! 그치만 지금은 안 급하니 패스합니당~
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.
저는 이렇게 인터페이스 두는 방식이 멋져보여서 따라한 곳들이 있는데 저도 수정해야겠군요 허허🥕
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.
중간 점검 때 강사님이
.d.ts파일로 빼는 게 좋다고 하셨으니 기능 구현 후 리팩토링 때 해보겠습니다!!