-
Notifications
You must be signed in to change notification settings - Fork 3
fix: team match logic #223
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
base: main
Are you sure you want to change the base?
Conversation
| # @router.post("/{team_id}/confirm") | ||
| # def confirm_route(team_id: int, db: Session = Depends(get_db), current_user=Depends(get_current_user)): | ||
| # return confirm_membership(db, team_id, current_user["sub"]) |
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.
안 쓰는 코드는 지워 주세요. 😉
| team.status = TeamStatus.CANCELLED | ||
| db.commit() | ||
| else: | ||
| my_member = ( |
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.
my_member 라는 표현은 좀 어색하네요. my_member 대신 me 로 바꾸면 어떨까요? 👀
| member.is_active = False | ||
| if team.status == TeamStatus.PENDING: | ||
| time_diff = datetime.now() - team.created_at | ||
| if time_diff > timedelta(minutes=5): |
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.
5 는 상수로 빼면 좋을 것 같아요. (PENDING_TIMEOUT_MINUTES 랑 같은 걸까요? 👀)
|
commit 예시에 따르면 tag 는 (근데 fix 가 아닌 것 같아요. 😅 feat ?? refactor ??) |
📝 PR 타입
📜 설명
이전 회의에서 나왔던 팀 매칭 조건으로 수정했습니다.
한명이 팀 매칭 요청을 보내면 다른 유저들은 참여 형식으로 되어 있습니다.
"/create"로 1번이 2, 3, 4, 5와 팀을 요청하면 PENDING 형식으로 만들어지고 2, 3, 4, 5번은 "/create"를 통해 해당 팀에 참여됩니다. 모든 팀이 참여를 하게 되면 ACTIVE가 되고 팀이 활성화되는 로직입니다.
"/{team_id}/status"를 통해 해당 팀의 상태와 참여 확인을 선택한 팀원들의 id를 반환해줍니다.
엮인 이슈
🔨 작업 내용
📸 스크린샷
🧑💻 테스트 결과
"/create"까지는 테스트했습니다. status와 cancel api와 함께 전체적인 진행에 대해서 테스트가 필요합니다.
📅 체크리스트