feat(api): standardize REST contracts and auth
This commit is contained in:
@@ -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="设置指定网络中的扩展数据"
|
||||
|
||||
Reference in New Issue
Block a user