mirror of
https://github.com/myronblair/kino-app
synced 2026-07-27 21:18:43 -05:00
Add app version number, shown in Navbar next to the logo
New backend/VERSION file (starts at 1.0.0) served via GET /api/version, displayed as a small "v1.0.0" next to the StreamHoard wordmark. Going forward I'll bump this on meaningful changes -- patch for fixes, minor for new features, major for big/breaking redesigns.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
1.0.0
|
||||
@@ -67,6 +67,13 @@ app = FastAPI(title="StreamHoard")
|
||||
api = APIRouter(prefix="/api")
|
||||
bearer = HTTPBearer(auto_error=False)
|
||||
|
||||
APP_VERSION = (ROOT_DIR / "VERSION").read_text().strip() if (ROOT_DIR / "VERSION").is_file() else "0.0.0"
|
||||
|
||||
|
||||
@api.get("/version")
|
||||
async def get_version():
|
||||
return {"version": APP_VERSION}
|
||||
|
||||
|
||||
# ---------- Auth deps ----------
|
||||
async def get_current_user(creds: Optional[HTTPAuthorizationCredentials] = Depends(bearer)) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user