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

搜尋最新註冊的遊戲 #214

Open
2 tasks
Tracked by #207
ricksu978 opened this issue Apr 14, 2024 · 1 comment
Open
2 tasks
Tracked by #207

搜尋最新註冊的遊戲 #214

ricksu978 opened this issue Apr 14, 2024 · 1 comment
Assignees

Comments

@ricksu978
Copy link
Member

ricksu978 commented Apr 14, 2024

Acceptance Criteria

  • 遊戲的 API Endpoint 可以搜尋最新註冊的遊戲 (依照「註冊日期」排序,由新到舊)

Tasks

  • 設計 API Route, Request and Response (可以 re-use 現有的 endpoint 或 新的 endpoint)
  • 實作他!
@kuoche1712003
Copy link
Contributor

kuoche1712003 commented May 12, 2024

目前查詢遊戲的 api 是以下的 api
GET /games

[
    {
        "id": "6496cff366371525c35a04c5",
        "name": "明星3缺1麻將",
        "img": "https://placekitten.com/300/300",
        "minPlayers": 4,
        "maxPlayers": 4,
        "createdOn": "2024-01-01T14:00:00Z"
    }
]

預計調整為可接受 query parameter
GET /games?sort_by=createdOn
response body 結構不變
這樣就會以 createdOn 排序由新到舊

之後要實作其他的也可以用這個 query parameter 傳遞不同的值
決定如何排序

如果沒有傳遞 query parameter 就造目前系統行為
確保向下相容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants