Reorganized model structure by replacing 'object' and 'items' with a unified 'item' model using UUIDs, and moved base model logic into separate files. Updated routes to use the new item model and improved request/response handling. Enhanced user and setting models, added utility functions, and improved error handling throughout the codebase. Also added initial .idea project files and minor admin API improvements. Co-Authored-By: 砂糖橘 <54745033+Foxerine@users.noreply.github.com>
20 lines
488 B
Python
20 lines
488 B
Python
from fastapi import APIRouter
|
|
from model.response import DefaultResponse
|
|
from pkg import conf
|
|
|
|
Router = APIRouter(prefix='/api/site', tags=['站点 Site'])
|
|
|
|
@Router.get(
|
|
path='/ping',
|
|
summary='站点健康检查',
|
|
description='检查站点是否在线',
|
|
response_model=DefaultResponse,
|
|
response_description='站点在线'
|
|
)
|
|
async def ping():
|
|
"""
|
|
站点健康检查接口。
|
|
|
|
:return: Findreve 版本号
|
|
"""
|
|
return DefaultResponse(data=conf.VERSION) |