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

fix : cursor 응답 스키마 변경 #174

Merged
merged 3 commits into from
Sep 20, 2024
Merged

Conversation

GaBaljaintheroom
Copy link
Contributor

@GaBaljaintheroom GaBaljaintheroom commented Sep 18, 2024

😋 작업한 내용

  • cursor를 data 목록에서 뺐습니다.
    "size": 1,
    "hasNext": false,
    "data": [
        {
            "id": "01919901-105d-b5b2-cbaf-912f20281ce8",
            "title": "OFFICIAL HIGE DANDISM REJOICE ASIA TOUR 2024 : 2024 오피셜히게단디즘 내한공연",
            "startAt": "2024-12-1",
            "endAt": "2024-12-1",
            "location": "일산 킨텍스 제1전시장 5홀",
            "posterImageURL": "https://showpot-s3.s3.ap-northeast-2.amazonaws.com/show/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202024-08-28%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%209.37.40_1724848869198.png"
        }
    ],
    "cursor": {
        "id": "019205d7-b727-8af3-8f9e-1ffe5237fcef",
        "value": "2024-09-19T00:54:36.204"
    }
}

{
    "size": 1,
    "hasNext": false,
    "data": [
        {
            "id": "019194aa-d2fd-e29f-96c7-df9101dfd1b6",
            "title": "Post Malone If Y'all Weren't Here I'd Be Crying : 포스트말론 내한공연",
            "startAt": "2024-9-27",
            "endAt": "2024-9-27",
            "location": "여의도 KBS홀",
            "imageURL": "https://showpot-s3.s3.ap-northeast-2.amazonaws.com/show/%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C%20%281%29_1724936633293.jfif"
        }
    ],
    "cursor": {
        "id": "019194aa-d2fd-e29f-96c7-df9101dfd1b6",
        "value": null
    }
}

이런식입니당.

🙏 PR Point

  • cursor 데이터가 없을 때에는 CursorApiResponse.noneCursor()가 나을까요 아님 그냥 null을 반환시킬까용?

👍 관련 이슈


@GaBaljaintheroom GaBaljaintheroom added the fix fix feature label Sep 18, 2024
@GaBaljaintheroom GaBaljaintheroom self-assigned this Sep 18, 2024
Copy link
Contributor

@devmizz devmizz left a comment

Choose a reason for hiding this comment

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

noneCursor라면 (null, null)하는 건 어떨까요?
근데 지금은 마지막 데이터가 없으면 noneCursor라서, 사실 noneCursor가 호출될 경우가 0에 가까워 보이는데,
hasNext가 false인 경우에 noneCursor를 호출하는 게 더 맞아보여요!

@GaBaljaintheroom GaBaljaintheroom merged commit 7addf21 into develop Sep 20, 2024
1 check passed
@GaBaljaintheroom GaBaljaintheroom deleted the fix/cursor-response branch September 21, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fix feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants