code-corps / code-corps/code-corps-api

Several of our endpoints allow fetching all records of that type.

未關閉
#396 7 則留言 0 個 reaction 已指派 1 人 已被 @begedin 認領 在 GitHub 檢視
question
主要語言
Elixir
星號
234
分支
82
PR 合併指標
30 天內沒有已合併 PR

描述

Several of our endpoints allow fetching all records. We should really handle this in some way.

The way I see it, we have two choices
1. Enforce query requirements. If those query requirements are not met (for example, a list of ids), we can
- Raise a custom error and return that error as a response
- Return 0 results
2. Limit index/all requests to X records

List of endpoints that allow this
- `category`
- `comment` (after merging #372, could've fixed there, but figured we should handle it all after a discussion)
- `donation_goal`
- `organization`
- `project_category`
- `project_controller`
- `project_skill`
- `role`
- `role_skill`
- `skill`
- `task`
- `user`
- `user_category`
- `user_role`
- `user_skill`

Obviously, not all of these are as troublesome, but we should probably handle them all as consistently as it makes sense.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。