feat(api): standardize REST contracts and auth

This commit is contained in:
2026-07-30 20:38:51 +08:00
parent ae1a657554
commit ba947b616b
86 changed files with 54193 additions and 990 deletions
+5 -5
View File
@@ -11,7 +11,7 @@ from app.services.tjnetwork import (
router = APIRouter()
@router.get(
"/getallextensiondatakeys/",
"/all-extension-data-keys",
summary="获取所有扩展数据键",
description="获取指定网络的所有扩展数据的键列表"
)
@@ -32,7 +32,7 @@ async def get_all_extension_data_keys_endpoint(
return get_all_extension_data_keys(network)
@router.get(
"/getallextensiondata/",
"/all-extension-datas",
summary="获取所有扩展数据",
description="获取指定网络的所有扩展数据"
)
@@ -53,7 +53,7 @@ async def get_all_extension_data_endpoint(
return get_all_extension_data(network)
@router.get(
"/getextensiondata/",
"/extension-datas",
summary="获取指定扩展数据",
description="获取指定网络中指定键的扩展数据值"
)
@@ -75,8 +75,8 @@ async def get_extension_data_endpoint(
"""
return get_extension_data(network, key)
@router.post(
"/setextensiondata/",
@router.patch(
"/extension-datas",
response_model=None,
summary="设置扩展数据",
description="设置指定网络中的扩展数据"