mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-20 05:10:26 -05:00
96955aee62
Add VersionService to fetch and cache the latest GitHub release, compare it to the installed semver (APP_VERSION when valid, else setup.py), and expose admin-only GET /api/version/check and POST /api/version/dismiss on the legacy /api blueprint (session or Bearer token). Persist per-user dismissal in users.dismissed_release_version (Alembic 148) and show a non-blocking update card in base.html for administrators. Add packaging for semver parsing and tests for comparison, service, and routes. Document configuration in docs/admin/deployment/VERSION_MANAGEMENT.md and endpoints in docs/api/REST_API.md and docs/API.md.
13 lines
290 B
Python
13 lines
290 B
Python
"""Typed response for GET /api/version/check."""
|
|
|
|
from typing import TypedDict
|
|
|
|
|
|
class VersionCheckResponse(TypedDict):
|
|
update_available: bool
|
|
current_version: str
|
|
latest_version: str | None
|
|
release_notes: str | None
|
|
published_at: str | None
|
|
release_url: str | None
|