Centralise DbDep and mark Task 11 complete
This commit is contained in:
@@ -22,19 +22,16 @@ registered *before* the ``/{id}`` routes so FastAPI resolves them correctly.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
import aiosqlite
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, status
|
||||
from fastapi import APIRouter, HTTPException, Query, status
|
||||
|
||||
from app.dependencies import (
|
||||
AuthDep,
|
||||
DbDep,
|
||||
Fail2BanSocketDep,
|
||||
GeoBatchLookupDep,
|
||||
HttpSessionDep,
|
||||
SchedulerDep,
|
||||
SettingsDep,
|
||||
get_db,
|
||||
)
|
||||
from app.models.blocklist import (
|
||||
BlocklistListResponse,
|
||||
@@ -52,8 +49,6 @@ from app.tasks.blocklist_import import run_import_with_resources
|
||||
|
||||
router: APIRouter = APIRouter(prefix="/api/blocklists", tags=["Blocklists"])
|
||||
|
||||
DbDep = Annotated[aiosqlite.Connection, Depends(get_db)]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Source list + create
|
||||
|
||||
Reference in New Issue
Block a user