mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(python): move request & pkgbase request routes
Move package request routes and related routes to their respective routers. In addition, move some utility used for requests over from `aurweb.packages`. Introduced routers: - `aurweb.routers.requests` Introduced package: - `aurweb.requests` Introduced module: - `aurweb.requests.util` Changes: - Moved `aurweb.packages.validate` to `aurweb.pkgbase.validate` - Moved requests listing & request closure routes to `aurweb.routers.requests` - Moved pkgbase request creation route to `aurweb.routers.pkgbase` - Moved `get_pkgreq_by_id` from `aurweb.packages.util` to `aurweb.requests.util` and fixed its return type hint. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
a77d44e919
commit
a1f46611e1
10 changed files with 218 additions and 195 deletions
|
@ -21,7 +21,7 @@ from aurweb.auth import BasicAuthBackend
|
|||
from aurweb.db import get_engine, query
|
||||
from aurweb.models import AcceptedTerm, Term
|
||||
from aurweb.prometheus import http_api_requests_total, http_requests_total, instrumentator
|
||||
from aurweb.routers import accounts, auth, html, packages, pkgbase, rpc, rss, sso, trusted_user
|
||||
from aurweb.routers import accounts, auth, html, packages, pkgbase, requests, rpc, rss, sso, trusted_user
|
||||
from aurweb.templates import make_context, render_template
|
||||
|
||||
# Setup the FastAPI app.
|
||||
|
@ -82,6 +82,7 @@ async def app_startup():
|
|||
app.include_router(rss.router)
|
||||
app.include_router(packages.router)
|
||||
app.include_router(pkgbase.router)
|
||||
app.include_router(requests.router)
|
||||
app.include_router(rpc.router)
|
||||
|
||||
# Initialize the database engine and ORM.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue