fix: scope Alpine gitea_workspace + commit admin fallback + settings cleanup
FlowDeck CI / test (push) Failing after 6s
FlowDeck CI / docker (push) Has been skipped

1. gitea_workspace.html: owner/repo en Jinja2 dans la topbar (pas Alpine)
2. gitea.py: save_file/delete_file → _require_gitea (admin token can write)
3. settings.html: retrait doublon defaultView, fix workspace_name Jinja2
This commit is contained in:
2026-07-13 20:47:46 -04:00
parent e22efc1d9c
commit 0d66b5d543
3 changed files with 4 additions and 19 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ async def get_file(request: Request, owner: str, repo: str, path: str):
async def save_file(request: Request, owner: str, repo: str):
"""Create or update a file in the repo."""
import json
gitea = _require_user_gitea(request)
gitea = _require_gitea(request) # admin token can write too
try:
body = await request.json()
except Exception:
@@ -111,7 +111,7 @@ async def save_file(request: Request, owner: str, repo: str):
async def delete_file(request: Request, owner: str, repo: str):
"""Delete a file from the repo."""
import json
gitea = _require_user_gitea(request)
gitea = _require_gitea(request) # admin token can write too
path = request.query_params.get("path", "")
sha = request.query_params.get("sha", "")
message = request.query_params.get("message", "Delete via FlowDeck")