fix: param order in gitea routes (request first)
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

This commit is contained in:
2026-07-13 14:52:33 -04:00
parent 5baae598bf
commit 00860417a8
+5 -5
View File
@@ -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: