mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
web server now uses StateManager method to update DataService attributes
This commit is contained in:
parent
b594a91a18
commit
24f1574168
@ -81,10 +81,11 @@ class WebAPI:
|
|||||||
@sio.event # type: ignore
|
@sio.event # type: ignore
|
||||||
def frontend_update(sid: str, data: UpdateDict) -> Any:
|
def frontend_update(sid: str, data: UpdateDict) -> Any:
|
||||||
logger.debug(f"Received frontend update: {data}")
|
logger.debug(f"Received frontend update: {data}")
|
||||||
path_list, attr_name = data["parent_path"].split("."), data["name"]
|
path_list = [*data["parent_path"].split("."), data["name"]]
|
||||||
path_list.remove("DataService") # always at the start, does not do anything
|
path_list.remove("DataService") # always at the start, does not do anything
|
||||||
return self.service.update_DataService_attribute(
|
path = ".".join(path_list)
|
||||||
path_list=path_list, attr_name=attr_name, value=data["value"]
|
return self.state_manager.set_service_attribute_value_by_path(
|
||||||
|
path=path, value=data["value"]
|
||||||
)
|
)
|
||||||
|
|
||||||
self.__sio = sio
|
self.__sio = sio
|
||||||
|
Loading…
x
Reference in New Issue
Block a user