gallery of photos in the activity page

This commit is contained in:
Davide Scaini
2026-03-29 15:51:39 +02:00
parent b0ab7fbe3f
commit a9839e8242
4 changed files with 125 additions and 12 deletions
+9
View File
@@ -8,6 +8,7 @@ from pathlib import Path
from typing import Any
from fastapi import FastAPI, File, HTTPException, UploadFile
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse
# Populated by the CLI before uvicorn starts
@@ -16,6 +17,14 @@ site_url: str = "http://localhost:4321"
app = FastAPI(title="BincioActivity Edit Server", docs_url=None, redoc_url=None)
# Allow the Astro dev server (and any local origin) to call the write API
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["*"],
allow_headers=["*"],
)
SPORTS = ["cycling", "running", "hiking", "walking", "swimming", "skiing", "other"]
STAT_PANELS = ["elevation", "speed", "heart_rate", "cadence", "power"]