💥 Fix: korrigierte Path für Templates / main.py (relativer Pfad)
docker-build-and-push / build (push) Successful in 18s
docker-build-and-push / build (push) Successful in 18s
This commit is contained in:
+4
-2
@@ -19,8 +19,10 @@ def get_token():
|
||||
|
||||
app = FastAPI(title="Gitea Sync AI", version="1.0")
|
||||
|
||||
# Frontend ausliefern
|
||||
# Frontend ausliefern - verwende relativen Pfad
|
||||
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
||||
|
||||
@app.get("/", response_class=HTMLResponse)
|
||||
async def dashboard(request: Request):
|
||||
with open("/home/user/projects/gitea-cloner/app/templates/index.html") as f:
|
||||
with open(TEMPLATES_DIR / "index.html") as f:
|
||||
return f.read()
|
||||
Reference in New Issue
Block a user