mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-02 02:11:29 +00:00
Some checks are pending
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
Gitleaks / gitleaks (push) Waiting to run
Publish / Classify release event (push) Waiting to run
Publish / RC guard (marker + release-PR skip) (push) Blocked by required conditions
Publish / ci (push) Blocked by required conditions
Publish / Publish to npm (push) Blocked by required conditions
Publish / Build & Push RC Docker images (push) Blocked by required conditions
Scorecard / Scorecard analysis (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-cli) (push) Waiting to run
Trivy Image Scan / Trivy (gitnexus-web) (push) Waiting to run
17 lines
505 B
Python
17 lines
505 B
Python
from fastapi import APIRouter, Depends
|
|
|
|
|
|
def get_db():
|
|
return None
|
|
|
|
|
|
# Router-level dependency listed BEFORE `prefix=` — exercises the
|
|
# balanced-paren scan end-to-end. The old `[^)]*?` regex stopped at the
|
|
# `)` of `Depends(...)` and dropped the prefix, leaving the Route node
|
|
# unprefixed; this route must still resolve to `/v1/items/{item_id}`.
|
|
router = APIRouter(dependencies=[Depends(get_db)], prefix="/items")
|
|
|
|
|
|
@router.get("/{item_id}")
|
|
def get_item(item_id: str):
|
|
return {"id": item_id}
|