Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/framex/driver/application.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Module containing FastAPI instance related functions and classes."""

import json
import os
from collections.abc import Callable
from contextlib import asynccontextmanager
from datetime import UTC, datetime
Expand All @@ -27,6 +28,7 @@

FRAME_START_TIME = datetime.now(tz=UTC)
SHANGHAI_TZ = ZoneInfo("Asia/Shanghai")
REVERSION = settings.server.reversion or os.getenv("REVERSION")


def build_openapi_description() -> str:
Expand All @@ -42,7 +44,7 @@ def build_openapi_description() -> str:
|--------|-------|
| Started At | `{started_at}` |
| Uptime | `{uptime}` |
| Service-Version | `v{settings.server.reversion}` |
| Service-Version | `v{REVERSION}` |
| FrameX-Version | `v{VERSION}` |

---
Expand Down
2 changes: 1 addition & 1 deletion src/framex/plugin/on.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def decorator(cls: type) -> type:

params = extract_method_params(func)
version: str = plugin.module.__plugin_meta__.version
version = f"v{version}" if version.startswith("v") else version
version = f"v{version}" if not version.startswith("v") else version
plugin_apis.append(
PluginApi(
api=path,
Expand Down
Loading