DeployBoard / DeployBoard/deployboard-python

Remove duplicate calls from every route

未關閉
#2 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
api enhancement
主要語言
Python
星號
10
分支
1
PR 合併指標
30 天內沒有已合併 PR

描述

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?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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