Skip to content
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

[BE] FIX: friend server, api 수정 #182 #184

Merged
merged 1 commit into from
Feb 16, 2025
Merged

Conversation

yoo-chris
Copy link
Collaborator

해당 사항 (중복 선택)

  • FEAT : 새로운 기능 추가 및 개선
  • FIX : 기존 기능 수정 및 정상 동작을 위한 간단한 추가, 수정사항
  • BUG : 버그 수정
  • REFACTOR : 결과의 변경 없이 코드의 구조를 재조정
  • TEST : 테스트 코드 추가
  • DOCS : 코드가 아닌 문서를 수정한 경우
  • REMOVE : 파일을 삭제하는 작업만 수행
  • RENAME : 파일 또는 폴더명을 수정하거나 위치(경로)를 변경
  • ETC : 이외에 다른 경우 - 어떠한 사항인지 작성해주세요.

설명

🔗 관련 이슈

해결한 이슈: closed #이슈번호

📝 작업 내용

{{host}} = http://localhost:8000

친구 요청 (/api/friends/request) - (senderId, receiverId 데이터를 body로 받아서 처리)

image

친구 수락 및 거절 - (senderId, receiverId 데이터를 body로 받아서 처리)

image

친구 목록 조회 (/api/friends/list) - (token header의 x-user-id 로 처리)

image

친구/방 요청 정보 조회 (api/friends/requests) - (token header의 x-user-id 로 처리)

image

안읽은 요청개수 반환 (api/friends/unread) - (token header의 x-user-id 로 처리)

image

@yoo-chris yoo-chris self-assigned this Feb 16, 2025
@yoo-chris yoo-chris added FIX 기존 기능을 수정할 경우(주로 안 좋았던 것에서 좋은 것으로) 🕹️BE 백엔드 작업 labels Feb 16, 2025
Copy link
Collaborator

@dahyun24 dahyun24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굳👍

@app.get("/api/friends/unread/{userId}") # notifications/unread
async def get_friend_requests(userId: int, redis=Depends(get_redis)):
@app.get("/api/friends/unread") # notifications/unread
async def get_friend_requests(x_user_id: int = Header(...), redis=Depends(get_redis)):
# 친구 요청 키 조회
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안 읽은 요청 개수 반환은 알림 탭에 몇 개 안읽었는지 알려주기 위함인가요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네네 빨간불을 띄우려면 안읽은게 있는지 없는지 우선 알아야하는데

고도화했을 때 몇개 안읽었는지 보여주려면 개수로 반환해주는게 좋을 것 같아서요!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다😊

@yoo-chris yoo-chris merged commit 62bd409 into dev Feb 16, 2025
@42inshin 42inshin deleted the be-friend/dev/fix_api/#182 branch February 16, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹️BE 백엔드 작업 FIX 기존 기능을 수정할 경우(주로 안 좋았던 것에서 좋은 것으로)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants