added get option

This commit is contained in:
ben 2022-11-23 22:27:09 +00:00
parent 4b707b5a30
commit 2f08255e92

View File

@ -733,6 +733,10 @@ async def websocket_connect(websocket: WebSocket, item_id: str):
async def websocket_update(item_id: str, data: str):
await updater(item_id, data)
@core_app.get("/api/v1/ws/{item_id}/{data}")
async def websocket_update(item_id: str, data: str):
await updater(item_id, data)
async def updater(item_id, data):
return await manager.send_data(
f"{data}", item_id