mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 11:29:39 +08:00
perf: 首页展示版本信息
This commit is contained in:
19
pkg/api/http/controller/groups/system.py
Normal file
19
pkg/api/http/controller/groups/system.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import quart
|
||||
|
||||
from .....core import app
|
||||
from .. import group
|
||||
from .....utils import constants
|
||||
|
||||
|
||||
@group.group_class('system', '/api/v1/system')
|
||||
class SystemRouterGroup(group.RouterGroup):
|
||||
|
||||
async def initialize(self) -> None:
|
||||
@self.route('/info', methods=['GET'])
|
||||
async def _() -> str:
|
||||
return self.success(
|
||||
data={
|
||||
"version": constants.semantic_version,
|
||||
"debug": constants.debug_mode
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user