fix: returned object
This commit is contained in:
@@ -619,4 +619,5 @@ class Health(BaseModel):
|
|||||||
bot_startup_ts: int | None = None
|
bot_startup_ts: int | None = None
|
||||||
|
|
||||||
class ListCustomData(BaseModel):
|
class ListCustomData(BaseModel):
|
||||||
custom_data: list[dict[str, Any]] | None = None
|
trade_id: int
|
||||||
|
custom_data: list[dict[str, Any]]
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ def sysinfo():
|
|||||||
def health(rpc: RPC = Depends(get_rpc)):
|
def health(rpc: RPC = Depends(get_rpc)):
|
||||||
return rpc.health()
|
return rpc.health()
|
||||||
|
|
||||||
@router.get("/trades/{tradeid}/custom_data", response_model=ListCustomData, tags=["info"])
|
@router.get("/trades/{tradeid}/custom-data", response_model=list[ListCustomData], tags=["info"])
|
||||||
def list_custom_data(trade_id: int, rpc: RPC = Depends(get_rpc)):
|
def list_custom_data(trade_id: int, rpc: RPC = Depends(get_rpc)):
|
||||||
custom_data = rpc._rpc_list_custom_data(trade_id)
|
custom_data = rpc._rpc_list_custom_data(trade_id)
|
||||||
return ListCustomData(custom_data=custom_data)
|
return custom_data
|
||||||
|
|||||||
Reference in New Issue
Block a user