DeployBoard / DeployBoard/deployboard-python

Remove duplicate calls from every route

オープン
#2 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。