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

Feat(ranking): ranking api 제공 #263

Closed
vimkim opened this issue Feb 6, 2024 · 2 comments · Fixed by #264
Closed

Feat(ranking): ranking api 제공 #263

vimkim opened this issue Feb 6, 2024 · 2 comments · Fixed by #264
Assignees
Labels
enhancement 개선 또는 피드백 반영

Comments

@vimkim
Copy link
Collaborator

vimkim commented Feb 6, 2024

💎 개발할 기능

방에 참가한 유저들 중에서

현재 문제를 더 많이 푼 순서대로,

똑같은 문제를 풀었다면, 마지막 문제를 더 빨리 푼 순서대로

정렬해서 앞단에 플레이어의 이름의 목록을 보내준다.

request

GET /room/{roomId}/ranking

response

{
	"users": [ "kim", "lee", "park" ]
}
@vimkim vimkim self-assigned this Feb 6, 2024
@vimkim vimkim added the enhancement 개선 또는 피드백 반영 label Feb 6, 2024
@vimkim
Copy link
Collaborator Author

vimkim commented Feb 6, 2024

submission -> roomUser
roomUser -> submission

circular dependency가 발생하는 것을 어떻게 해결할지?

https://blog.logrocket.com/avoid-circular-dependencies-nestjs/

위 글을 참고해서 submission, roomUser를 둘 다 import하는 중간 다리 서비스인

rankingService를 만들어서 해결해보겠습니다!

@vimkim
Copy link
Collaborator Author

vimkim commented Feb 6, 2024

[
  {
    "id": 1,
    "username": "mock",
    "numberOfProblemsSolved": 0,
    "mostRecentCorrectSubmissionTime": ""
  },
  {
    "id": 2,
    "username": "mock2",
    "numberOfProblemsSolved": 0,
    "mostRecentCorrectSubmissionTime": ""
  }
]

일단은 이런 형태로 올 것 같습니다!

@vimkim vimkim linked a pull request Feb 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 개선 또는 피드백 반영
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant