DeployBoard / DeployBoard/deployboard-python
Remove duplicate calls from every route
Đang mở
api
enhancement
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
There are two specific calls that _almost_ every route will require, but not _every_ route.
Every route called by a user requires a current_user object which we currently get via `Depends(get_active_current_user)`
https://github.com/DeployBoard/deployboard/blob/init/src/api/routes/users.py#L19
and `verify_role` here: https://github.com/DeployBoard/deployboard/blob/init/src/api/routes/users.py#L24
How can we build these two functions into the route to return the `current_user` object into the route function?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.