Skip to content

홈 랭크 조회 오류 #416

@daeho-ro

Description

@daeho-ro

1. 랭크 조회 api 오류

사용자 랭크가 3 이하인 경우, 현재 페이지가 -1로 처리됩니다.

https://github.com/git-goods/git-animal-client/blob/e9294cbdf9a0770e785fa43c05a311a949e2cc07/apps/web/src/app/%5Blocale%5D/landing/RankingSection/RankingServerSide.tsx#L28

그러면 홈에서 랭킹 조회시에

https://github.com/git-goods/git-animal-client/blob/e9294cbdf9a0770e785fa43c05a311a949e2cc07/apps/web/src/app/%5Blocale%5D/landing/RankingSection/RankingServerSide.tsx#L36

startRankNumber를 -1로 계산하고 호출하는데, 해당 api는 rank를 0보다 큰 값을 요구합니다.

결과:

Request URL
https://render.gitanimals.org/ranks?rank=-1&size=5&type=WEEKLY_USER_CONTRIBUTIONS
Request Method
GET
Status Code
400 Bad Request

Image

2. 랭크 자체의 이슈

본인의 랭크를 알기 위해서 다음 api를 호출합니다.

> curl https://render.gitanimals.org/ranks/by-username/daeho-ro ...
{
  "id": "673860353918768213",
  "rank": 0,
  "image": "https://avatars.githubusercontent.com/u/40587651?v=4",
  "name": "daeho-ro",
  "contributions": 42
}

보다시피 rank가 0으로, 1부터 1위가 아닌 상태입니다.

https://github.com/git-goods/git-animal-client/blob/e9294cbdf9a0770e785fa43c05a311a949e2cc07/apps/web/src/app/%5Blocale%5D/landing/RankingSection/RankingServerSide.tsx#L41

rank 1부터 1등으로 간주하고 있습니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions