mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(python): centralize router inclusion
Now, when we want to add, remove routes, our base routes should be defined in aurweb.routers.__init__.APP_ROUTES. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
a1f46611e1
commit
3e048e9675
2 changed files with 27 additions and 14 deletions
|
@ -3,3 +3,22 @@ API routers for FastAPI.
|
|||
|
||||
See https://fastapi.tiangolo.com/tutorial/bigger-applications/
|
||||
"""
|
||||
from . import accounts, auth, html, packages, pkgbase, requests, rpc, rss, sso, trusted_user
|
||||
|
||||
"""
|
||||
aurweb application routes. This constant can be any iterable
|
||||
and each element must have a .router attribute which points
|
||||
to a fastapi.APIRouter.
|
||||
"""
|
||||
APP_ROUTES = [
|
||||
accounts,
|
||||
auth,
|
||||
html,
|
||||
packages,
|
||||
pkgbase,
|
||||
requests,
|
||||
trusted_user,
|
||||
rss,
|
||||
rpc,
|
||||
sso,
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue