From 00860417a8f5c91e583b841d66b75de4e835750e Mon Sep 17 00:00:00 2001 From: bruno Date: Mon, 13 Jul 2026 14:52:33 -0400 Subject: [PATCH] fix: param order in gitea routes (request first) --- app/routers/gitea.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/routers/gitea.py b/app/routers/gitea.py index 172f39f..835d1b5 100644 --- a/app/routers/gitea.py +++ b/app/routers/gitea.py @@ -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): +async def repo_tree(request: Request, owner: str, repo: str, path: str = ""): """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): # ── File content ── @router.get("/projects/{owner}/{repo}/file") -async def get_file(owner: str, repo: str, path: str, request: Request): +async def get_file(request: Request, owner: str, repo: str, path: str): """Get file content (decoded).""" gitea = _require_gitea(request) try: @@ -76,7 +76,7 @@ async def get_file(owner: str, repo: str, path: str, request: Request): # ── Save file (create or update) ── @router.put("/projects/{owner}/{repo}/file") -async def save_file(owner: str, repo: str, request: Request): +async def save_file(request: Request, owner: str, repo: str): """Create or update a file in the repo.""" import json gitea = _require_gitea(request) @@ -99,7 +99,7 @@ async def save_file(owner: str, repo: str, request: Request): # ── Delete file ── @router.delete("/projects/{owner}/{repo}/file") -async def delete_file(owner: str, repo: str, request: Request): +async def delete_file(request: Request, owner: str, repo: str): """Delete a file from the repo.""" import json gitea = _require_gitea(request) @@ -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): +async def get_labels(request: Request, owner: str, repo: str): """Get labels for a repo (mapped to tags).""" gitea = _require_gitea(request) try: