fix: indentation gitea_client + request defaults
This commit is contained in:
@@ -43,7 +43,7 @@ async def list_projects(request: Request, org: str = ""):
|
||||
|
||||
# ── Repo tree ──
|
||||
@router.get("/projects/{owner}/{repo}/tree")
|
||||
async def repo_tree(owner: str, repo: str, path: str = "", request: Request = None):
|
||||
async def repo_tree(owner: str, repo: str, path: str = "", request: Request):
|
||||
"""Get contents of a repo directory (one level)."""
|
||||
gitea = _require_gitea(request)
|
||||
try:
|
||||
@@ -64,7 +64,7 @@ async def repo_tree(owner: str, repo: str, path: str = "", request: Request = No
|
||||
|
||||
# ── File content ──
|
||||
@router.get("/projects/{owner}/{repo}/file")
|
||||
async def get_file(owner: str, repo: str, path: str, request: Request = None):
|
||||
async def get_file(owner: str, repo: str, path: str, request: Request):
|
||||
"""Get file content (decoded)."""
|
||||
gitea = _require_gitea(request)
|
||||
try:
|
||||
@@ -117,7 +117,7 @@ async def delete_file(owner: str, repo: str, request: Request):
|
||||
|
||||
# ── Labels ──
|
||||
@router.get("/projects/{owner}/{repo}/labels")
|
||||
async def get_labels(owner: str, repo: str, request: Request = None):
|
||||
async def get_labels(owner: str, repo: str, request: Request):
|
||||
"""Get labels for a repo (mapped to tags)."""
|
||||
gitea = _require_gitea(request)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user