mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 08:20:02 +02:00
fix: http endpoint trigger_method
The trigger_method endpoint was retrieving the access_path parameter as a the query parameter. Instead, it should get it from the request body.
This commit is contained in:
parent
1d8d17d715
commit
045334e51e
@ -70,13 +70,13 @@ async def _trigger_method(
|
||||
) -> aiohttp.web.Response:
|
||||
log_id = get_log_id(request)
|
||||
|
||||
access_path = request.rel_url.query["access_path"]
|
||||
data: TriggerMethodDict = await request.json()
|
||||
|
||||
access_path = data["access_path"]
|
||||
|
||||
logger.info("Client [%s] is triggering the method '%s'", log_id, access_path)
|
||||
|
||||
data: TriggerMethodDict = await request.json()
|
||||
|
||||
method = get_object_attr_from_path(state_manager.service, data["access_path"])
|
||||
method = get_object_attr_from_path(state_manager.service, access_path)
|
||||
|
||||
try:
|
||||
if inspect.iscoroutinefunction(method):
|
||||
|
Loading…
x
Reference in New Issue
Block a user